Restore working directory after installation
This commit is contained in:
parent
39e7e31c57
commit
f321087c17
1 changed files with 3 additions and 1 deletions
|
@ -4,15 +4,17 @@ CONTEXT_ROOT="${CONTEXT_ROOT}";
|
||||||
if [ ! "$UID" -eq 0 ]
|
if [ ! "$UID" -eq 0 ]
|
||||||
then
|
then
|
||||||
CONTEXT_ROOT="$(mktemp -d)";
|
CONTEXT_ROOT="$(mktemp -d)";
|
||||||
|
workingDir="$(pwd)";
|
||||||
|
|
||||||
sudo \
|
sudo \
|
||||||
CONTEXT_ROOT="${CONTEXT_ROOT}" \
|
CONTEXT_ROOT="${CONTEXT_ROOT}" \
|
||||||
bash "$BASH_SOURCE";
|
bash "$BASH_SOURCE";
|
||||||
|
|
||||||
cd "$CONTEXT_ROOT";
|
cd "$CONTEXT_ROOT";
|
||||||
makepkg -si;
|
makepkg -si;
|
||||||
|
cd "$workingDir";
|
||||||
else
|
else
|
||||||
scriptRoot="$(realpath "${BASH_SOURCE%/*}")";
|
scriptRoot="$(realpath "${BASH_SOURCE%/*}")";
|
||||||
workingDir="$(pwd)";
|
|
||||||
patchFile="allow_insecure_crypto.patch";
|
patchFile="allow_insecure_crypto.patch";
|
||||||
patchedConfig="openssl_insecure_crypto.cnf";
|
patchedConfig="openssl_insecure_crypto.cnf";
|
||||||
chmod a+rwx "$contextDir"
|
chmod a+rwx "$contextDir"
|
||||||
|
|
Loading…
Reference in a new issue