diff --git a/Makefile b/Makefile index dc20422..ca5d51c 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ test: # Checking for syntax errors set -e; for SCRIPT in *.sh; \ do \ - sh -n $$SCRIPT; \ + bash -n $$SCRIPT; \ done # Checking for bashisms (currently not failing, but only listing) diff --git a/backup.sh b/backup.sh index 678ec3d..747cd82 100755 --- a/backup.sh +++ b/backup.sh @@ -47,7 +47,7 @@ do if [ -n "$MAX_BACKUPS" ] then # Execute the delete script, delete older backup or other custom delete script - /delete.sh $db $EXT + /delete.sh "$db" $EXT fi else rm -rf "$FILENAME" diff --git a/run.sh b/run.sh index 320047c..5990e0a 100755 --- a/run.sh +++ b/run.sh @@ -16,9 +16,8 @@ elif [ -n "${INIT_RESTORE_LATEST}" ]; then find /backup -maxdepth 1 -name '[0-9]*.*.sql.gz' | sort | tail -1 | xargs /restore.sh fi -function final_backup () { +function final_backup { echo "=> Captured trap for final backup" - DATE=$(date +%Y%m%d%H%M) echo "=> Requested last backup at $(date "+%Y-%m-%d %H:%M:%S")" exec /backup.sh exit 0