This repository has been archived by the owner on Apr 22, 2019. It is now read-only.
Finally, bash-builder scripts can be run directly!
Install 6.1.1 or later to be able to use #!/usr/bin/env bbrun
as your executable, and you will be able to run bash-builder scripts directly (assuming you have also installed the library scripts your own script needs)!
Note that to achieve this, bbrun builds your script to a temp space - so using "$0"
for identifying where the script was called from no longer works. Instead, you need to use the "$BBRUN_SCRIPT" variable which will point to the location of the original script.
An example use would be:
#!/usr/bin/env bbrun
#%include std/out.sh
main() {
out:info "You ran '$BBRUN_SCRIPT' (compiled to '$0')"
}
main "$@"
Of course, using syntax-extensions.sh
and all libraries are also supported as normal. It's just a shebangable wrapper around bbuild
after all...