Alexandre Aubin
93cc413f4a
helpers: lint/reformat with shfmt -bn -i 4 -w $FILE
2021-10-06 16:01:53 +02:00
Kayou
6945867f86
detect wrong arguments
2020-09-16 13:23:10 +02:00
Kay0u
8d5422d13f
[fix] Fix getopts and helpers
2020-07-27 19:20:36 +02:00
Maniack Crudelis
6468402e68
Merge branch 'stretch-unstable' into clean_helpers
2020-04-24 20:20:32 +02:00
Maniack Crudelis
f72be82429
Fix getopts with empty parameters
2020-04-21 16:24:49 +02:00
Maniack Crudelis
b0398ae6dc
Use long arguments instead of short ones
2020-04-20 15:20:31 +02:00
Maniack Crudelis
57061b8e1d
Unfold if-then when more than one line
2020-04-19 20:31:06 +02:00
Maniack Crudelis
80964a1312
Standardize tabulations
2020-04-19 20:03:55 +02:00
Maniack Crudelis
1dd4a73e17
Replace declare -Ar by local A for args_array
2020-04-19 19:10:39 +02:00
Maniack Crudelis
0ad8daa6ae
Remove escape character in getopts
2019-07-21 18:35:19 +02:00
Maniack Crudelis
3a8d312ed2
[fix] Fix values starting by - in getopts
2019-07-09 20:06:16 +02:00
Maniack Crudelis
8b8df94bef
Keep useful comments...
...
We still use eval, comment about its usage is still relevant...
2019-03-28 19:37:23 +01:00
Gabriel Corona
84c66990c3
Avoid having to shell-escape arguments in ynh_handle_getopts_args
...
Fixes $ ` and \ injections.
2019-03-25 19:09:00 +01:00
Maniack Crudelis
ebaa16da3d
Merge pull request #683 from YunoHost/fix_getopts
...
Escape $ in getopts
2019-03-25 13:51:20 +01:00
Maniack Crudelis
652edc204c
Syntax fix
2019-03-16 16:53:07 +01:00
Maniack Crudelis
ad748a75f6
eval is useful and working before being evil...
2019-03-16 16:15:54 +01:00
Maniack Crudelis
23d7a0005d
Escape $ in getopts
2019-03-16 16:05:32 +01:00
Maniack Crudelis
873bf4ae37
Add min version for all helpers
2019-02-25 18:44:21 +01:00
Maniack Crudelis
573fab4268
[fix] Escape double quote before eval in getopts
...
Work in progress...
Need to be tested.
2019-02-10 21:23:56 +01:00
Maniack Crudelis
540291a7e0
Ignore useless parameters in legacy mode
2019-01-04 19:26:54 +01:00
Maniack Crudelis
50f3291ea7
Fix getopts with blank argument's value
...
There's no reason in that loop where we're looking for values of an option to have a blank cell in the array of arguments. Unless for an option with a missing value.
In that case, it's better to ignore this condition and store a blank value in the variable.
Otherwise, in case of missing value for an option, with this condition, we enter in an infinite loop, because the shift will stay at 0.
2019-01-04 18:44:40 +01:00
Maniack Crudelis
976f160afb
Fix getopts and its legacy mode
2019-01-04 17:11:49 +01:00
Maniack Crudelis
4bac17a162
Merge branch 'stretch-unstable' into use_getops
2018-12-29 19:07:25 +01:00
Maniack Crudelis
2094557e1e
Use getopts helpers in getopts itself
2018-12-29 18:51:49 +01:00
Maniack Crudelis
e918836ab0
Fix multiple value for getopts ( #592 )
2018-12-01 16:21:31 +01:00
Maniack Crudelis
45ad53eb43
Add the internal helper ynh_handle_getopts_args
2018-08-27 21:44:22 +02:00