Use getopts helpers in getopts itself

This commit is contained in:
Maniack Crudelis 2018-12-29 18:51:49 +01:00 committed by GitHub
parent 0aa8a2ede3
commit 2094557e1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,10 +98,10 @@ ynh_handle_getopts_args () {
if [ "$parameter" = "?" ]
then
ynh_die "Invalid argument: -${OPTARG:-}"
ynh_die --message="Invalid argument: -${OPTARG:-}"
elif [ "$parameter" = ":" ]
then
ynh_die "-$OPTARG parameter requires an argument."
ynh_die --message="-$OPTARG parameter requires an argument."
else
local shift_value=1
# Use the long option, corresponding to the short option read by getopts, as a variable