From 47adaceed0f8e6e325da27903d0919c9ab9f5f5e Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 12 Jul 2022 15:07:36 -0600 Subject: [PATCH] feature(version): add version display to script --- backup/restore.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backup/restore.sh b/backup/restore.sh index 99d5bff..fce1002 100755 --- a/backup/restore.sh +++ b/backup/restore.sh @@ -175,6 +175,7 @@ writeLog() { ### parameter defaults # script related +scriptVersion="4.0" scriptPath="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)" scriptName="$(basename "$0")" errorCount=0 @@ -209,6 +210,11 @@ while [ $# -gt 0 ]; do # display help scriptHelp ;; + --version) + # display script version + printf "\nMailcowRestore - Restore Mailcow from a borgbackup repo : Version %s\n\n" ${scriptVersion} + exit 0 + ;; -l | --log) # set logfile location if [ -z "$2" ]; then