Redirect variables during process elevation
This commit is contained in:
parent
ed625c88c6
commit
0614901e5f
|
@ -4,7 +4,7 @@ NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
|
||||||
# Elevate script
|
# Elevate script
|
||||||
if [ ! "$UID" -eq 0 ]
|
if [ ! "$UID" -eq 0 ]
|
||||||
then
|
then
|
||||||
sudo bash "$BASH_SOURCE" "$USER";
|
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" sudo bash "$BASH_SOURCE" "$USER";
|
||||||
else
|
else
|
||||||
homeDir="$(sudo -u "$1" bash -c 'realpath ~')";
|
homeDir="$(sudo -u "$1" bash -c 'realpath ~')";
|
||||||
fontFileBaseName="Caskaydia Cove Regular Nerd Font Complete.otf";
|
fontFileBaseName="Caskaydia Cove Regular Nerd Font Complete.otf";
|
||||||
|
|
|
@ -4,7 +4,7 @@ NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
|
||||||
# Elevate script
|
# Elevate script
|
||||||
if [ ! "$UID" -eq 0 ]
|
if [ ! "$UID" -eq 0 ]
|
||||||
then
|
then
|
||||||
sudo bash "$BASH_SOURCE" "$USER";
|
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" sudo bash "$BASH_SOURCE" "$USER";
|
||||||
else
|
else
|
||||||
bin=oh-my-posh;
|
bin=oh-my-posh;
|
||||||
contextRoot="$(mktemp -d)";
|
contextRoot="$(mktemp -d)";
|
||||||
|
|
Loading…
Reference in a new issue