From 41d0ccea2b86b4ecce6d0db2deec535a6109680c Mon Sep 17 00:00:00 2001 From: Adphi Date: Thu, 19 Apr 2018 17:11:49 +0200 Subject: [PATCH] Update 'tools/install.sh' --- tools/install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 227970f1..a66d5b97 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -27,8 +27,7 @@ main() { CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l) if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then printf "${YELLOW}Zsh is not installed!${NORMAL} Installing zsh\n" - apt-get install zsh - exit + apt-get install zsh -y fi unset CHECK_ZSH_INSTALLED @@ -117,4 +116,9 @@ main() { env zsh } +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi + main