diff --git a/glances-install.sh b/glances-install.sh index d4aa729..218f9a0 100644 --- a/glances-install.sh +++ b/glances-install.sh @@ -11,6 +11,8 @@ Red='\033[10;31m' LRed='\033[1;31m' #echo -e "${Green}TEST${Color_Off}" +function join_by { local IFS="$1"; shift; echo "$*"; } + # Execute a command as root (or sudo) do_with_root() { # already root? "Just do it" (tm). @@ -120,11 +122,8 @@ exitstatus=$? if [ $exitstatus = 0 ]; then do_with_root pip install --upgrade pip - - for DEP in $DEPS - do - do_with_root pip install $DEP - done + DEPS=$(join_by , $DEPS) + do_with_root pip install $DEPS fi # Install or ugrade Glances from the Pipy repository