summaryrefslogtreecommitdiff
path: root/Meta/build-image-qemu.sh
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-06-30 20:48:51 +0200
committerLinus Groh <mail@linusgroh.de>2022-07-08 12:04:01 +0200
commit139f8717817755f0bf072a1fa1c91e596d4f79aa (patch)
tree69def41d19e3212f6de4cad8357777e69a6fc325 /Meta/build-image-qemu.sh
parent84e10172721406d7ac81a67ac75139855481a1bb (diff)
downloadserenity-139f8717817755f0bf072a1fa1c91e596d4f79aa.zip
Meta: Use `pls` instead of `sudo` on SerenityOS
Diffstat (limited to 'Meta/build-image-qemu.sh')
-rwxr-xr-xMeta/build-image-qemu.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/Meta/build-image-qemu.sh b/Meta/build-image-qemu.sh
index e61df38950..cb4934e1b0 100755
--- a/Meta/build-image-qemu.sh
+++ b/Meta/build-image-qemu.sh
@@ -14,6 +14,12 @@ fi
set -e
+SUDO="sudo"
+
+if [ "$(uname -s)" = "SerenityOS" ]; then
+ SUDO="pls"
+fi
+
die() {
echo "die: $*"
exit 1
@@ -25,7 +31,7 @@ if [ "$(id -u)" != 0 ]; then
if [ -x "$FUSE2FS_PATH" ] && $FUSE2FS_PATH --help 2>&1 |grep fakeroot > /dev/null; then
USE_FUSE2FS=1
else
- sudo -E -- "$0" "$@" || die "this script needs to run as root"
+ ${SUDO} -E -- "$0" "$@" || die "this script needs to run as root"
exit 0
fi
else