[pacman-dev] Shabang in scripts

Pierre Neidhardt ambrevar at gmail.com
Sat Mar 1 15:14:23 EST 2014


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?

-- 
Pierre Neidhardt

Oh, get ahold of yourself.  Nobody's proposing that we parse English.
             -- Larry Wall in <199709032332.QAA21669 at wall.org>


More information about the pacman-dev mailing list