add -V
This commit is contained in:
parent
54154f5360
commit
1b51381cc4
|
@ -68,6 +68,8 @@ Usage
|
|||
-n dry-run, don't actually create snapshots
|
||||
-x don't automatically append the date in epoch to
|
||||
the snapshot name
|
||||
-V print the version number and exit
|
||||
|
||||
Development Notes
|
||||
-----------------
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
# Date: November 20, 2015
|
||||
# License: MIT
|
||||
|
||||
VERSION='v1.0.0'
|
||||
|
||||
usage() {
|
||||
local prog=${0##*/}
|
||||
cat <<-EOF
|
||||
|
@ -29,16 +31,18 @@ usage() {
|
|||
-n dry-run, don't actually create snapshots
|
||||
-x don't automatically append the date in epoch to
|
||||
the snapshot name
|
||||
-V print the version number and exit
|
||||
EOF
|
||||
}
|
||||
|
||||
dryrun=false
|
||||
date=true
|
||||
while getopts 'hnx' option; do
|
||||
while getopts 'hnxV' option; do
|
||||
case "$option" in
|
||||
h) usage; exit 0;;
|
||||
n) dryrun=true;;
|
||||
x) date=false;;
|
||||
V) echo "$VERSION"; exit 0;;
|
||||
*) usage; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue