diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-10-16 19:17:50 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-10-16 23:39:45 +0200 |
commit | 032ef1b461ba17018a02f57ee6a188e18d19969f (patch) | |
tree | 17601a269b7f23162b065fad1c882f64a4a94c12 | |
parent | 2f439327ac82c6f4dc7cf220509c07d5bc04d29d (diff) | |
download | serenity-032ef1b461ba17018a02f57ee6a188e18d19969f.zip |
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.
-rwxr-xr-x | Meta/build-image-extlinux.sh | 6 | ||||
-rwxr-xr-x | Meta/build-image-grub.sh | 6 | ||||
-rwxr-xr-x | Meta/build-image-limine.sh | 6 | ||||
-rwxr-xr-x | Meta/build-native-partition.sh | 6 |
4 files changed, 24 insertions, 0 deletions
diff --git a/Meta/build-image-extlinux.sh b/Meta/build-image-extlinux.sh index f52e29b168..863d91bb7e 100755 --- a/Meta/build-image-extlinux.sh +++ b/Meta/build-image-extlinux.sh @@ -2,6 +2,12 @@ set -e +SUDO="sudo" + +if [ "$(uname -s)" = "SerenityOS" ]; then + SUDO="pls" +fi + die() { echo "die: $*" exit 1 diff --git a/Meta/build-image-grub.sh b/Meta/build-image-grub.sh index c0b8ecc2bd..4bb95b7667 100755 --- a/Meta/build-image-grub.sh +++ b/Meta/build-image-grub.sh @@ -2,6 +2,12 @@ set -e +SUDO="sudo" + +if [ "$(uname -s)" = "SerenityOS" ]; then + SUDO="pls" +fi + die() { echo "die: $*" exit 1 diff --git a/Meta/build-image-limine.sh b/Meta/build-image-limine.sh index c84330323a..b4c2ac8c3c 100755 --- a/Meta/build-image-limine.sh +++ b/Meta/build-image-limine.sh @@ -2,6 +2,12 @@ set -e +SUDO="sudo" + +if [ "$(uname -s)" = "SerenityOS" ]; then + SUDO="pls" +fi + die() { echo "die: $*" exit 1 diff --git a/Meta/build-native-partition.sh b/Meta/build-native-partition.sh index 89ea47f6ec..fa73ad6da5 100755 --- a/Meta/build-native-partition.sh +++ b/Meta/build-native-partition.sh @@ -2,6 +2,12 @@ set -e +SUDO="sudo" + +if [ "$(uname -s)" = "SerenityOS" ]; then + SUDO="pls" +fi + die() { echo "die: $*" exit 1 |