From a6e719d167497f406dc494c117e6f032d451f828 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 16 May 2022 00:09:17 -0300 Subject: bin/backup: Fix WARNING message for exit code 0 --- bin/backup | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin/backup') diff --git a/bin/backup b/bin/backup index 01cca40..018e080 100755 --- a/bin/backup +++ b/bin/backup @@ -111,8 +111,10 @@ run() { ~/ STATUS=$? - if [ "$STATUS" = 0 ] || [ "$STATUS" = 1 ]; then - echo 'WARNING, but no ERROR.' >&2 + if [ "$STATUS" = 0 ]; then + return 0 + elif [ "$STATUS" = 1 ]; then + printf 'WARNING, but no ERROR.\n' >&2 return 0 else return "$STATUS" -- cgit v1.2.3