From b38410253b1e3e6fdadbf75bed02ad342016c101 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 19 Mar 2018 21:21:53 -0500 Subject: [PATCH] Update glances-install.sh --- glances-install.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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