implement version
This commit is contained in:
10
sxbm
10
sxbm
@ -8,8 +8,9 @@
|
||||
# CONFIG #
|
||||
##########
|
||||
|
||||
# Appname
|
||||
# Appname and Version
|
||||
APPNAME="sxbm"
|
||||
VERSION="v0.1"
|
||||
|
||||
# Where all the data gets stored
|
||||
# Respects XDG_DATA_HOME if set
|
||||
@ -54,6 +55,12 @@ COMMANDS:
|
||||
-v|--version print the version and exit\n\n"
|
||||
}
|
||||
|
||||
version(){
|
||||
printf "$APPNAME $VERSION\n"
|
||||
printf "GPLv3 license\n"
|
||||
printf "https://github.com/n-r-k/sxbm\n"
|
||||
}
|
||||
|
||||
bm_add(){
|
||||
[ -z "$1" ] && die "No arguments provided. Use '$APPNAME -h' for help"
|
||||
|
||||
@ -191,6 +198,7 @@ case "$1" in
|
||||
usage && exit 0
|
||||
;;
|
||||
"-v"|"--version")
|
||||
version && exit 0
|
||||
;;
|
||||
*)
|
||||
die "Invalid command. Use '$APPNAME -h' for help!"
|
||||
|
||||
Reference in New Issue
Block a user