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