mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
guix-install.sh: Avoid "#!/bin/bash" shebang.
Fixes <https://bugs.gnu.org/34279>. Reported by Claes Wallin (韋嘉誠) <clacke@lysator.liu.se>. * etc/guix-install.sh: Change shebang to #!/bin/sh and add 'if' statement to spawn Bash if needed.
This commit is contained in:
parent
a10050e2dd
commit
f5fdc54d3a
1 changed files with 8 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
# GNU Guix --- Functional package management for GNU
|
# GNU Guix --- Functional package management for GNU
|
||||||
# Copyright © 2017 sharlatan <sharlatanus@gmail.com>
|
# Copyright © 2017 sharlatan <sharlatanus@gmail.com>
|
||||||
# Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
|
# Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
|
||||||
|
@ -19,6 +19,13 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# We require Bash but for portability we'd rather not use /bin/bash or
|
||||||
|
# /usr/bin/env in the shebang, hence this hack.
|
||||||
|
if [ "x$BASH_VERSION" = "x" ]
|
||||||
|
then
|
||||||
|
exec bash "$0" "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
[ "$UID" -eq 0 ] || { echo "This script must be run as root."; exit 1; }
|
[ "$UID" -eq 0 ] || { echo "This script must be run as root."; exit 1; }
|
||||||
|
|
Loading…
Reference in a new issue