Meta: Define SUDO for all the image building scripts

Back when adding support for `pls` as a `sudo` replacement,
`build-image-qemu` dynamically set the `SUDO` variable depending on what
system it was running on and used the contents of that variable to call
the correct elevation utility.

During recent changes to the elevation error message, that usage of the
variable was replicated across all of our scripts, but without also
replicating the logic to set that variable in the first place.

Add back the variable setting logic to all the other scripts to keep
them from running into unset variables.
This commit is contained in:
Tim Schumacher 2022-10-16 19:17:50 +02:00 committed by Linus Groh
parent 2f439327ac
commit 032ef1b461
4 changed files with 24 additions and 0 deletions

View file

@ -2,6 +2,12 @@
set -e
SUDO="sudo"
if [ "$(uname -s)" = "SerenityOS" ]; then
SUDO="pls"
fi
die() {
echo "die: $*"
exit 1

View file

@ -2,6 +2,12 @@
set -e
SUDO="sudo"
if [ "$(uname -s)" = "SerenityOS" ]; then
SUDO="pls"
fi
die() {
echo "die: $*"
exit 1

View file

@ -2,6 +2,12 @@
set -e
SUDO="sudo"
if [ "$(uname -s)" = "SerenityOS" ]; then
SUDO="pls"
fi
die() {
echo "die: $*"
exit 1

View file

@ -2,6 +2,12 @@
set -e
SUDO="sudo"
if [ "$(uname -s)" = "SerenityOS" ]; then
SUDO="pls"
fi
die() {
echo "die: $*"
exit 1