[pacman-dev] Shabang in scripts
Allan McRae
allan at archlinux.org
Sat Mar 1 19:01:32 EST 2014
On 02/03/14 06:14, Pierre Neidhardt wrote:
> This maybe a futile question, but not much to lose here so I'm still asking:
> should we let the autotools change the path of the interpreter in the shabang of
> the different scripts? (See makepkg and so on.)
>
> Actually, according to
>
> https://wiki.archlinux.org/index.php/DeveloperWiki:Bash_Coding_Style
>
> it is said that the interpreter should be /bin/bash, not /usr/bin/bash. The
> latter being far less common. Note that the source files are properly set to
> /bin/*, only the autotools change them to the realpath of the build system.
>
> This is really a minor issue, but I believe that switching it back to /bin/bash
> would remove one portability problem for most systems. For instance, to run
> makepkg on a non-Arch system, we download the 'pacman' binary package first,
> from which we extract the 'makepkg' and the 'makepkg.conf' files. Since the
> package was built on an Arch system, the shabang is set to /usr/bin/bash. On
> non-Arch system, we usually need to make to change the shabang back to
> /bin/bash.
>
> What do you think?
>
Bash is not found in /bin in various BSDs.
Allan
More information about the pacman-dev
mailing list