From d6217926f275b8b19a4b2f0f32b0319122e5b8d5 Mon Sep 17 00:00:00 2001 From: "Fco. Javier Delgado del Hoyo" Date: Thu, 19 Jan 2023 20:14:48 +0100 Subject: [PATCH] fix minor issues --- Makefile | 2 +- backup.sh | 2 +- run.sh | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) 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