mirror of
https://github.com/donl/vzpbackup.git
synced 2026-06-30 06:11:58 -06:00
allow only valid integers for --keep-count
This commit is contained in:
parent
39b3f5a40c
commit
ec038625f7
1 changed files with 3 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ INC_BACKUP="no"
|
|||
|
||||
# COMMANDLINE PARSING
|
||||
|
||||
shopt -s extglob
|
||||
for param in "$@"; do
|
||||
case $param in
|
||||
-h|--help)
|
||||
|
|
@ -23,7 +24,7 @@ for param in "$@"; do
|
|||
--destination=*)
|
||||
DESTINATION=${param#*=}
|
||||
;;
|
||||
--keep-count=*)
|
||||
--keep-count=+([0-9]))
|
||||
KEEP_COUNT=${param#*=}
|
||||
;;
|
||||
--suspend=*)
|
||||
|
|
@ -37,6 +38,7 @@ for param in "$@"; do
|
|||
;;
|
||||
esac
|
||||
done
|
||||
shopt -u extglob
|
||||
|
||||
test "$SUSPEND" -eq "yes" && SUSPEND="" || SUSPEND="--skip-suspend"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue