summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Ørsted Andresen <bo.andresen@zlin.dk>2007-03-07 10:26:34 +0000
committerBo Ørsted Andresen <bo.andresen@zlin.dk>2007-03-07 10:26:34 +0000
commit02c7415424ce442c97b7f7b3105fa435f4382820 (patch)
tree33b9460c559887b4d2410ebe989fa764c903391a
parentfd396349bc4220f88c77076a81b444c61ff16235 (diff)
downloadwgetpaste-02c7415424ce442c97b7f7b3105fa435f4382820.tar.gz
Use == instead of =~. This is more reliable and works with Bash 2.05.
-rwxr-xr-xwgetpaste6
1 files 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