only check for existenve of local path if we need it

This commit is contained in:
Rob Pearce 2019-03-20 20:34:56 +11:00
parent da46e88982
commit b09a7b16cc
1 changed files with 9 additions and 9 deletions

18
bare.sh
View File

@ -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