The Bash transpiler - Write in a modern language and run in any Bash shell
Full docs at the wiki.
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!
You can run a Bashpile script directly:
- Install Homebrew if it is not already installed
- Ensure Homebrew's new
bin
directory is added to your path for non-interactive login Bash scripts - E.g. in ~/.bash_profile, ~/.bash_login, or ~/.profile, directly or indirectly.
- Ensure Homebrew's new
- Run
brew install michael-amiethyst/bashpile/bashpile
- Create and run just like a Bash script but with a different shebang line:
- Create the Bashpile script, such as:
#!/usr/bin/env bashpile print("Hello World")
- Make it executable with
chmod 755 SCRIPT_NAME
orsudo chmod 755 SCRIPT_NAME
- Run it with
./SCRIPT_NAME
- Create the Bashpile script, such as: