Skip to content

Commit 47adace

Browse files
committed
feature(version): add version display to script
1 parent 475a0d0 commit 47adace

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backup/restore.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ writeLog() {
175175

176176
### parameter defaults
177177
# script related
178+
scriptVersion="4.0"
178179
scriptPath="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)"
179180
scriptName="$(basename "$0")"
180181
errorCount=0
@@ -209,6 +210,11 @@ while [ $# -gt 0 ]; do
209210
# display help
210211
scriptHelp
211212
;;
213+
--version)
214+
# display script version
215+
printf "\nMailcowRestore - Restore Mailcow from a borgbackup repo : Version %s\n\n" ${scriptVersion}
216+
exit 0
217+
;;
212218
-l | --log)
213219
# set logfile location
214220
if [ -z "$2" ]; then

0 commit comments

Comments
 (0)