-
Notifications
You must be signed in to change notification settings - Fork 112
Description
Hello, first thank you for creating this awesome language.
I think Amber could help a broader audience if it had the option to produced only Portable Shell Code, personally I was looking for some alternative to GNU autoconf which various C projects use to probe the operating system to find dependencies, test compilers, etc..
The issue with autoconf is that it adds a bunch of .m4 files to the project, and require the developer to write an ugly mix of shell with m4 macros which by the end become a single ultra portable configure shell script.
The are other alternatives to autoconf, but usually requires extra dependencies in the system or aren't portable across different systems, while a shell script works out-of-the-box "almost" anywhere and doesn't requires any other dependency in the system.
Bash is not optimal for MacOS or Windows systems
- In MacOS the default shell is
zsh(or a very old bash), which have some incompatible features tobash, and other things behaves differently than bash. Apple ships a pretty old bash for compatibility purposes, but because amber produces bash code, we cannot safely dosourceinside.zshrcfor example. - Other targets includes Windows MSYS2 and WSL shells, etc.
While trying to get rid of autoconf I collected a few portable shell scripts examples here:
https://github.com/Lohann/shell-tools/tree/main/scripts