From 5785856d45e05fff5d246105bb2c900d0c166dbe Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 3 Apr 2023 11:09:32 +0200 Subject: [PATCH] Change chdir of sudo installation properly --- scripts/Arch/Software/sudo/install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/Arch/Software/sudo/install.sh b/scripts/Arch/Software/sudo/install.sh index e4c31b20..96d7b340 100644 --- a/scripts/Arch/Software/sudo/install.sh +++ b/scripts/Arch/Software/sudo/install.sh @@ -1,5 +1,7 @@ #!/bin/bash # Elevate script +pushd "${BASH_SOURCE%/*}" > /dev/null; + if [ ! "$UID" -eq 0 ] then sudo bash "$BASH_SOURCE"; @@ -7,3 +9,5 @@ else pacman --noconfirm -Syu sudo; source "../../Config/sudo/install.sh"; fi; + +popd > /dev/null;