From 949fefaf35b5dc15519b5168e9340efefc804a33 Mon Sep 17 00:00:00 2001 From: layman Date: Mon, 19 Sep 2022 07:32:52 +0200 Subject: [PATCH] ignore warnings due to changed files --- borgthismachine.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/borgthismachine.sh b/borgthismachine.sh index 1973c3b..6e9844a 100755 --- a/borgthismachine.sh +++ b/borgthismachine.sh @@ -62,6 +62,7 @@ if [[ -n "${MAC}" ]] ; then fi fi +set +e #wordsplitting is needed for arguments #shellcheck disable=SC2046 nice ionice -c 3 borg create --stats \ @@ -75,7 +76,15 @@ nice ionice -c 3 borg create --stats \ "${MYREPO}::${SNAPSHOT}" \ "${BORG_BACKUP_DIRS[@]}" -echo RetVal = $? +RetVal=$? + +echo "RetVal = $RetVal" + +if [[ $RetVal != "0" && $RetVal != "1" ]] ; then + exit "$RetVal" +fi + +set -e if [[ "${APPENDONLY}" != "YES" ]] ; then time borg prune -v "$MYREPO" "${BORG_PRUNEARG[@]}"