aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-05-16 00:09:17 -0300
committerEuAndreh <eu@euandre.org>2022-05-16 00:09:22 -0300
commita6e719d167497f406dc494c117e6f032d451f828 (patch)
tree35a12af89d1cd8e6f7ecaad0950c1cb2218a537e
parentbin/backup: Remove EXIT trap (diff)
downloaddotfiles-a6e719d167497f406dc494c117e6f032d451f828.tar.gz
dotfiles-a6e719d167497f406dc494c117e6f032d451f828.tar.xz
bin/backup: Fix WARNING message for exit code 0
-rwxr-xr-xbin/backup6
1 files changed, 4 insertions, 2 deletions
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"