From f321087c176909ca1f2e1e3b2de80b0f5170dfd1 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 3 Apr 2023 19:28:33 +0200 Subject: [PATCH] Restore working directory after installation --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index decf311..c914687 100755 --- a/install.sh +++ b/install.sh @@ -4,15 +4,17 @@ CONTEXT_ROOT="${CONTEXT_ROOT}"; if [ ! "$UID" -eq 0 ] then CONTEXT_ROOT="$(mktemp -d)"; + workingDir="$(pwd)"; + sudo \ CONTEXT_ROOT="${CONTEXT_ROOT}" \ bash "$BASH_SOURCE"; cd "$CONTEXT_ROOT"; makepkg -si; + cd "$workingDir"; else scriptRoot="$(realpath "${BASH_SOURCE%/*}")"; - workingDir="$(pwd)"; patchFile="allow_insecure_crypto.patch"; patchedConfig="openssl_insecure_crypto.cnf"; chmod a+rwx "$contextDir"