From 397b61415ed6719b2fad400771a5cd32249f4aab Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 10 Sep 2018 11:00:55 -0500 Subject: [PATCH] Update linupx-install.sh --- linupx-install.sh | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/linupx-install.sh b/linupx-install.sh index 2d6f2c4..641dba3 100644 --- a/linupx-install.sh +++ b/linupx-install.sh @@ -1,17 +1,13 @@ #!/bin/bash # Wrapper script for install, for easier execution via URL. -if [ "$EUID" -ne 0 ]; then - sudo set -eu - # sudo git -c http.sslVerify=false clone https://git.schroedercity.com/voltron/LinUPx.git /opt/LinUPx - sudo git clone https://git.schroedercity.com/voltron/LinUPx.git /opt/LinUPx - sudo ln -s /opt/LinUPx/run.sh /usr/local/bin/runup -else - set -eu - # git -c http.sslVerify=false clone https://git.schroedercity.com/voltron/LinUPx.git /opt/LinUPx - git clone https://git.schroedercity.com/voltron/LinUPx.git /opt/LinUPx - ln -s /opt/LinUPx/run.sh /usr/local/bin/runup -fi +if [ "$EUID" -ne 0 ]; then PREFIX='sudo'; else PREFIX=''; fi + +$PREFIX set -eu +# $PREFIX git -c http.sslVerify=false clone https://git.schroedercity.com/voltron/LinUPx.git /opt/LinUPx +$PREFIX git clone https://git.schroedercity.com/voltron/LinUPx.git /opt/LinUPx +$PREFIX ln -s /opt/LinUPx/run.sh /usr/local/bin/runup + echo "" echo "To run updates, use the command: runup" echo ""