Skip to content

michael-amiethyst/homebrew-bashpile

Repository files navigation

Bashpile

The Bash transpiler - Write in a modern language and run in any Bash shell

Full docs at the wiki.

Features

Write in a strongly typed, Python-like language and compile to Bash so that your code can run on any Linux or Unix system. Bashpile hides the hard parts of Bash scripting and handles the gotchas, quirks and portability issues.

See the wiki for details!

Quickstart

You can run a Bashpile script directly:

  1. Install Homebrew if it is not already installed
    1. Ensure Homebrew's new bin directory is added to your path for non-interactive login Bash scripts
    2. E.g. in ~/.bash_profile, ~/.bash_login, or ~/.profile, directly or indirectly.
  2. Run brew install michael-amiethyst/bashpile/bashpile
  3. Create and run just like a Bash script but with a different shebang line:
    1. Create the Bashpile script, such as:
      #!/usr/bin/env bashpile
      
      print("Hello World")
      
    2. Make it executable with chmod 755 SCRIPT_NAME or sudo chmod 755 SCRIPT_NAME
    3. Run it with ./SCRIPT_NAME