From a66f991dc110fd868569640c1d8ea61c06699157 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 19 Dec 2016 02:36:41 +0100 Subject: allow arbitrary commands only for all hosts Signed-off-by: Holger Levsen --- deploy_everywhere | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/deploy_everywhere b/deploy_everywhere index f50abdc6..855eed01 100755 --- a/deploy_everywhere +++ b/deploy_everywhere @@ -15,6 +15,7 @@ # useful things: # ./deploy_everywhere all - deploy on all nodes (and handle 398 days hosts properly) +# ./deploy_everywhere all $foo - run "$foo" on all nodes (and handle 398 days hosts properly) # ./deploy_everywhere - deploy on jenkins only # ./deploy_everywhere jenkins - deploy on jenkins only # ./deploy_everywhere jenkins pb10 - deploy on jenkins and pb10 @@ -89,6 +90,12 @@ if [ "$1" = "all" ] ; then echo -n "Running j.d.n.git updates on $HOSTS now" # reset_clock can be false as update_jdn.sh sets the time reset_clock=false + shift + if [ -z "$1" ] ; then + real_command="$@" + echo -n "Running '$real_command' on $HOSTS now." + real_command="$@ && echo '__reallyreally=ok__'" + fi elif [ "$1" = "upgrade" ] ; then real_command="export LANG=C && sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get clean" shift @@ -125,10 +132,6 @@ elif [ "$1" = "" ] || [ "$1" = "jenkins" ] ; then esac done echo -n "Running j.d.n.git ('$real_command') updates on $HOSTS now" -else - real_command="$@" - echo -n "Running '$real_command' on $HOSTS now." - real_command="$@ && echo '__reallyreally=ok__'" fi BG="" -- cgit v1.2.3-70-g09d2