diff options
author | Bo Ørsted Andresen <bo.andresen@zlin.dk> | 2007-03-07 10:26:34 +0000 |
---|---|---|
committer | Bo Ørsted Andresen <bo.andresen@zlin.dk> | 2007-03-07 10:26:34 +0000 |
commit | 02c7415424ce442c97b7f7b3105fa435f4382820 (patch) | |
tree | 33b9460c559887b4d2410ebe989fa764c903391a | |
parent | fd396349bc4220f88c77076a81b444c61ff16235 (diff) | |
download | wgetpaste-02c7415424ce442c97b7f7b3105fa435f4382820.tar.gz |
Use == instead of =~. This is more reliable and works with Bash 2.05.
-rwxr-xr-x | wgetpaste | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -360,12 +360,12 @@ convert_to_raw() { # convert groups of short options to singular short options. convert long options to short options. for arg in "${@}"; do - if [[ "${arg}" =~ ^--.*= ]]; then + if [[ "${arg}" == --*=* ]]; then ARGS[${#ARGS[*]}]="${arg%=*}" ARGS[${#ARGS[*]}]="${arg#*=}" - elif [[ "${arg}" =~ ^-- ]]; then + elif [[ "${arg}" == --* ]]; then ARGS[${#ARGS[*]}]="${arg}" - elif [[ "${arg}" =~ ^- ]]; then + elif [[ "${arg}" == -* ]]; then for short_arg in $(echo "${arg#-}" | sed 's|.| -&|g'); do ARGS[${#ARGS[*]}]="${short_arg}" done |