From b09a7b16ccc91d27e1561f11a437efe72be82612 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Wed, 20 Mar 2019 20:34:56 +1100 Subject: [PATCH] only check for existenve of local path if we need it --- bare.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bare.sh b/bare.sh index e427537..ebd8368 100755 --- a/bare.sh +++ b/bare.sh @@ -319,17 +319,17 @@ for f in $REPOSTOBACKUP; do fi fi fi - fi - if ! [[ -e ${DATAPATH} ]]; then - log "Error: ${DATAPATH} doesn't exist" - exit 1 - fi + if ! [[ -e ${DATAPATH} ]]; then + log "Error: ${DATAPATH} doesn't exist" + exit 1 + fi - count=`ls ${DATAPATH} | wc -l` - if [ $count -le 2 ]; then - log "Error: ${DATAPATH} exists but appears to be empty" - exit 1 + count=`ls ${DATAPATH} | wc -l` + if [ $count -le 2 ]; then + log "Error: ${DATAPATH} exists but appears to be empty" + exit 1 + fi fi done