From 02c7415424ce442c97b7f7b3105fa435f4382820 Mon Sep 17 00:00:00 2001 From: Bo Ørsted Andresen Date: Wed, 7 Mar 2007 10:26:34 +0000 Subject: Use == instead of =~. This is more reliable and works with Bash 2.05. --- wgetpaste | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wgetpaste b/wgetpaste index 900feb3..cb77754 100755 --- a/wgetpaste +++ b/wgetpaste @@ -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 -- cgit v1.2.3