mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Getopts's not yet implemented for other helpers.
This commit is contained in:
parent
8ffd7e87f5
commit
0e96a8f659
1 changed files with 3 additions and 3 deletions
|
@ -98,10 +98,10 @@ ynh_handle_getopts_args () {
|
||||||
|
|
||||||
if [ "$parameter" = "?" ]
|
if [ "$parameter" = "?" ]
|
||||||
then
|
then
|
||||||
ynh_die --message="Invalid argument: -${OPTARG:-}"
|
ynh_die "Invalid argument: -${OPTARG:-}"
|
||||||
elif [ "$parameter" = ":" ]
|
elif [ "$parameter" = ":" ]
|
||||||
then
|
then
|
||||||
ynh_die --message="-$OPTARG parameter requires an argument."
|
ynh_die "-$OPTARG parameter requires an argument."
|
||||||
else
|
else
|
||||||
local shift_value=1
|
local shift_value=1
|
||||||
# Use the long option, corresponding to the short option read by getopts, as a variable
|
# Use the long option, corresponding to the short option read by getopts, as a variable
|
||||||
|
@ -179,7 +179,7 @@ ynh_handle_getopts_args () {
|
||||||
# Get the option_flag from getopts_parameters, by using the option_flag according to the position of the argument.
|
# Get the option_flag from getopts_parameters, by using the option_flag according to the position of the argument.
|
||||||
option_flag=${getopts_parameters:$i:1}
|
option_flag=${getopts_parameters:$i:1}
|
||||||
if [ -z "$option_flag" ]; then
|
if [ -z "$option_flag" ]; then
|
||||||
ynh_print_warn --message="Too many arguments ! \"${arguments[$i]}\" will be ignored."
|
ynh_print_warn "Too many arguments ! \"${arguments[$i]}\" will be ignored."
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
# Use the long option, corresponding to the option_flag, as a variable
|
# Use the long option, corresponding to the option_flag, as a variable
|
||||||
|
|
Loading…
Add table
Reference in a new issue