From 93a0cce519a389197e31dc1726c9365a802c1ae4 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Thu, 25 Oct 2018 09:06:35 -0600 Subject: [PATCH] added checkExist for file > 0 bytes --- root/scripts/backup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/root/scripts/backup.sh b/root/scripts/backup.sh index 04982be..550d42b 100644 --- a/root/scripts/backup.sh +++ b/root/scripts/backup.sh @@ -144,6 +144,15 @@ function checkExist { # not found return 1 fi + elif [ "$1" = "fs" ]; then + # find file > 0 bytes + if [ -s "$2" ]; then + # found + return 0 + else + # not found + return 1 + fi elif [ "$1" = "fd" ]; then # find directory if [ -d "$2" ]; then