From 7c90b98a4480dce30d9e54877046fc0a00f24917 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Fri, 30 Aug 2024 13:39:27 +0100 Subject: [PATCH] Fix help message generation in backup scripts allowing 0 parameter allowing scripts to accept '$' to show the help message. --- backup-image/list.sh | 2 +- backup-image/verify-all.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backup-image/list.sh b/backup-image/list.sh index 78bb057..ca8c434 100755 --- a/backup-image/list.sh +++ b/backup-image/list.sh @@ -1,5 +1,5 @@ #/bin/bash -if [ $# -eq 0 ]; then +if [[ "$1" != '$' ]]; then echo "Usage: list.sh [Storage disk root path]"; exit 2; fi diff --git a/backup-image/verify-all.sh b/backup-image/verify-all.sh index 8c4df7d..0a44928 100755 --- a/backup-image/verify-all.sh +++ b/backup-image/verify-all.sh @@ -1,6 +1,6 @@ #/bin/bash echo "Verify All Backups!"; -if [ $# -eq 0 ]; then +if [[ "$1" != '$' ]]; then echo "Usage: verify-all.sh [Storage disk root path]"; exit 2; fi