From 54db523c2839751f08f9104d08d4001fd123a4df Mon Sep 17 00:00:00 2001 From: mj Date: Tue, 31 Mar 2015 22:43:56 +0200 Subject: [PATCH] FIX install.sh --- tools/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index ae5fc51..c68b7e7 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -12,13 +12,15 @@ set -e +if [ $UID -eq 0 ]; then CMD_PREFIX="sudo"; else CMD_PREFIX=""; fi + if [ "$SHELL" != "$(which zsh)" ]; then echo "$(which zsh)" - sudo echo "enter pass...." + $CMD_PREFIX echo "enter pass...." echo "ok" - sudo apt-get -yq install curl dialog git nano zsh + $CMD_PREFIX apt-get -yq install curl dialog git nano zsh fi if [ 1 == 2 ]; then -- 2.0.0