Create the context root using the current user
This commit is contained in:
parent
baca906ad5
commit
280704886c
1 changed files with 8 additions and 4 deletions
12
install.sh
12
install.sh
|
@ -1,17 +1,21 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
CONTEXT_ROOT="${CONTEXT_ROOT}";
|
||||||
|
|
||||||
if [ ! "$UID" -eq 0 ]
|
if [ ! "$UID" -eq 0 ]
|
||||||
then
|
then
|
||||||
sudo bash "$BASH_SOURCE";
|
CONTEXT_ROOT="$(mktemp -d)";
|
||||||
|
sudo \
|
||||||
|
CONTEXT_ROOT="${CONTEXT_ROOT}" \
|
||||||
|
bash "$BASH_SOURCE";
|
||||||
else
|
else
|
||||||
scriptRoot="$(realpath "${BASH_SOURCE%/*}")";
|
scriptRoot="$(realpath "${BASH_SOURCE%/*}")";
|
||||||
workingDir="$(pwd)";
|
workingDir="$(pwd)";
|
||||||
contextDir="$(mktemp -d)";
|
|
||||||
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"
|
||||||
|
|
||||||
git clone https://aur.archlinux.org/networkmanager-openconnect-useragent-git.git "$contextDir";
|
git clone https://aur.archlinux.org/networkmanager-openconnect-useragent-git.git "$CONTEXT_ROOT";
|
||||||
cd "$contextDir";
|
cd "$CONTEXT_ROOT";
|
||||||
cp "$scriptRoot/$patchFile" .;
|
cp "$scriptRoot/$patchFile" .;
|
||||||
cp "$scriptRoot/$patchedConfig" .;
|
cp "$scriptRoot/$patchedConfig" .;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue