introduce isnumeric function
This commit is contained in:
parent
97c9dfb986
commit
f9d0b56f97
3 changed files with 10 additions and 3 deletions
|
|
@ -214,11 +214,9 @@ esac
|
|||
unset -f perr-unsupportedhash perr-forbiddenhash perr-recommendhash
|
||||
|
||||
# ensure $ROUNDS is a valid numeric
|
||||
re='^[0-9]+$'
|
||||
if ! [[ "$ROUNDS" =~ ^[0-9]+$ ]] ; then
|
||||
if ! isnumeric "$ROUNDS"; then
|
||||
throw-badval 1 "$ROUNDS" '-r|--rounds'
|
||||
fi
|
||||
unset -v re
|
||||
|
||||
# Acquire password from stdin
|
||||
if [[ "$STDIN" == true ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue