Fix multiple value for getopts (#592)

This commit is contained in:
Maniack Crudelis 2018-12-01 16:21:31 +01:00 committed by Alexandre Aubin
parent fd142a0976
commit e918836ab0

View file

@ -129,6 +129,8 @@ ynh_handle_getopts_args () {
shift_value=$(( shift_value - 1 ))
fi
# Declare the content of option_var as a variable.
eval ${option_var}=""
# Then read the array value per value
for i in `seq 0 $(( ${#all_args[@]} - 1 ))`
do
@ -140,8 +142,6 @@ ynh_handle_getopts_args () {
break
fi
else
# Declare the content of option_var as a variable.
eval ${option_var}=""
# Else, add this value to this option
# Each value will be separated by ';'
if [ -n "${!option_var}" ]