diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-06-08 02:25:48 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-06-08 02:25:48 +0200 |
commit | 2752f4a462004485afb6a5486375447b10cd7c36 (patch) | |
tree | a8dbc53693473e8696c23e1247ca78a6ce5abfd5 | |
parent | fa7ef611183f48a4133541184d0fc4203c44fda8 (diff) | |
download | ltask-2752f4a462004485afb6a5486375447b10cd7c36.tar.gz |
changed true/false to yes/no for consistency
-rw-r--r-- | Readme.md | 2 | ||||
-rwxr-xr-x | ltask | 10 | ||||
-rw-r--r-- | tasks/example | 2 | ||||
-rw-r--r-- | tasks/system-update | 2 |
4 files changed, 8 insertions, 8 deletions
@@ -43,7 +43,7 @@ Reference for environment variables SSH_IDENTITY path to ssh-key used for authentification of specified user FILES Array of Files to copy over before script invocation INCLUDES Array of libraries to include - PARALLEL Enable parallel execution (true/[false]) + PARALLEL Enable parallel execution (yes/[no]) # Available in setup ASSET_DIR path to folder where eg keys are stored @@ -36,7 +36,7 @@ export readonly INCLUDE_DIR=$BASEDIR/libs TASK= TARGET= -PARALLEL="false" +PARALLEL="no" HOSTS=() FILES=() @@ -64,7 +64,7 @@ function parse_args() { i=$((i+1)) HOSTS+=(${ARGV[$i]});; -p) - PARALLEL="true";; + PARALLEL="yes";; -h) print_help 0;; *) @@ -115,7 +115,7 @@ HOSTS_UNIQUE=($(tr ' ' '\n' <<< "${HOSTS[@]}" | sort -u)) COUNTER=0 HOSTCOUNT=${#HOSTS_UNIQUE[@]} -[ $PARALLEL = "true" ] && AND="&" +[ $PARALLEL = "yes" ] && AND="&" declare -A HOST_PID for hoststring in "${HOSTS_UNIQUE[@]}"; do @@ -133,7 +133,7 @@ for hoststring in "${HOSTS_UNIQUE[@]}"; do eval "$TOOL_DIR/rexec.sh $rexecargs | (while read l; do echo [$hostname] \$l; done) $AND" RET=$? - if [ $PARALLEL = "true" ]; then + if [ $PARALLEL = "yes" ]; then HOST_PID[$hostname]=$! else [ $RET -ne 0 ] && FAILED_HOSTS+=($hostname) @@ -143,7 +143,7 @@ for hoststring in "${HOSTS_UNIQUE[@]}"; do fi done -if [ $PARALLEL = "true" ]; then +if [ $PARALLEL = "yes" ]; then perror Waiting for remote tasks to finish... for hostname in ${!HOST_PID[@]}; do wait ${HOST_PID[$hostname]} diff --git a/tasks/example b/tasks/example index deb3c94..8974aee 100644 --- a/tasks/example +++ b/tasks/example @@ -13,7 +13,7 @@ function task_setup() { # $INCLUDE_DIR # Available Configuration - # $PARALLEL "true"/"false" + # $PARALLEL "yes"/"no" INCLUDES+=() diff --git a/tasks/system-update b/tasks/system-update index ececb6e..865014c 100644 --- a/tasks/system-update +++ b/tasks/system-update @@ -23,7 +23,7 @@ function task_setup() { PARALLEL="yes" - TASK_ISSET="true" + TASK_ISSET="yes" } if [ -z $HOSTMODE ]; then |