feature(version): add version display to script
This commit is contained in:
parent
475a0d0dd2
commit
47adaceed0
@ -175,6 +175,7 @@ writeLog() {
|
|||||||
|
|
||||||
### parameter defaults
|
### parameter defaults
|
||||||
# script related
|
# script related
|
||||||
|
scriptVersion="4.0"
|
||||||
scriptPath="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)"
|
scriptPath="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)"
|
||||||
scriptName="$(basename "$0")"
|
scriptName="$(basename "$0")"
|
||||||
errorCount=0
|
errorCount=0
|
||||||
@ -209,6 +210,11 @@ while [ $# -gt 0 ]; do
|
|||||||
# display help
|
# display help
|
||||||
scriptHelp
|
scriptHelp
|
||||||
;;
|
;;
|
||||||
|
--version)
|
||||||
|
# display script version
|
||||||
|
printf "\nMailcowRestore - Restore Mailcow from a borgbackup repo : Version %s\n\n" ${scriptVersion}
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
-l | --log)
|
-l | --log)
|
||||||
# set logfile location
|
# set logfile location
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user