aboutsummaryrefslogtreecommitdiff
path: root/etc/guix-install.sh
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-02-06 13:03:26 +0100
committerRicardo Wurmus <rekado@elephly.net>2019-02-06 13:03:26 +0100
commitba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d (patch)
tree75c68e44d3d76440f416552711b1a47ec83e411e /etc/guix-install.sh
parentf380f9d55e6757c242acf6c71c4a3ccfcdb066b2 (diff)
parent4aeb7f34c948f32363f2ae29c6942c6328df758c (diff)
downloadguix-ba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d.tar
guix-ba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'etc/guix-install.sh')
-rwxr-xr-xetc/guix-install.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 8eb5214049..dc8de2fe92 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# GNU Guix --- Functional package management for GNU
# Copyright © 2017 sharlatan <sharlatanus@gmail.com>
# Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
@@ -19,6 +19,13 @@
# You should have received a copy of the GNU General Public License
# 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
[ "$UID" -eq 0 ] || { echo "This script must be run as root."; exit 1; }