From d02a243ff86dec709c63925b90738cdbcc3e26ec Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Wed, 23 Mar 2022 19:06:56 +1100 Subject: [PATCH] spinnet --- t.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/t.sh b/t.sh index b2196e4..d6e8238 100755 --- a/t.sh +++ b/t.sh @@ -1,10 +1,13 @@ #!/bin/bash +#set -x trap "exit 1" TERM export MYPID=$$ + +. ${HOME}/code/bashtools/bashtools.sh if [[ -z $HAVE_BASHTOOLS ]]; then - echo "ERROR: bashtools not installed download from https://git.nethack.net/rob/bashtools" + echo "ERROR: bashtools not installed download from https://git.nethack.net/rob/bashtools" >/dev/stderr exit 1 fi @@ -1476,8 +1479,10 @@ function tasksync() { else noun="Sync" fi + notify "Syncing tasks" res=$(${VDIRSYNCER} sync 2>&1) rv=$? + [[ $rv -eq 0 ]] && ok || fail if [[ $rv -eq 0 ]]; then upcount=$(echo "$res" | grep -v ^Sync | grep -c ${VDS_REMOTE}) @@ -1719,8 +1724,6 @@ fi [[ -z $VDS_LOCAL ]] && VDS_LOCAL="$DEFAULT_VDS_LOCAL" [[ -z $VDS_REMOTE ]] && VDS_REMOTE="$DEFAULT_VDS_REMOTE" - - mode="" for x in $valid_modes; do thisone="words_$x" @@ -1742,8 +1745,10 @@ if [[ $mode == "sync" ]]; then exit $rv fi +notify "Processing" loadids || exit 1 loadtasks || exit 1 +ok [[ $TESTMODE -eq 1 ]] && exit 1 @@ -1860,7 +1865,6 @@ elif [[ $mode == "cleanup" ]]; then fi else # multi-task commands - filter=$* uids="" @@ -1958,6 +1962,7 @@ else done fi + needtitle=1 if [[ -z $uids ]]; then error "no matching tasks found."