mirror of
https://github.com/guezoloic/serverconfig.git
synced 2026-01-25 03:34:22 +00:00
fix(aws-backup.sh): add exit mode if no files/folders written
This commit is contained in:
@@ -56,6 +56,10 @@ if [[ "$1" == "clean" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ! -s "BACKUP" ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
while IFS= read -r SOURCE_PATH || [ -n "$SOURCE_PATH" ]; do
|
while IFS= read -r SOURCE_PATH || [ -n "$SOURCE_PATH" ]; do
|
||||||
if [[ -z "$SOURCE_PATH" || "$SOURCE_PATH" =~ ^[[:space:]]*$ ]]; then
|
if [[ -z "$SOURCE_PATH" || "$SOURCE_PATH" =~ ^[[:space:]]*$ ]]; then
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user