Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

string replacement turns out not POSIX compliant

  • Loading branch information...
commit 9c2127ce3347240c39c30c79d5c234ff294555a1 1 parent 5ec0cce
@koenpunt koenpunt authored
Showing with 12 additions and 14 deletions.
  1. +6 −7 install.sh
  2. +6 −7 nvm.sh
View
13 install.sh
@@ -16,13 +16,12 @@ nvm_download() {
curl $*
elif nvm_has "wget"; then
# Emulate curl with wget
- ARGS="$*"
- ARGS=${ARGS/--progress-bar /--progress=bar }
- ARGS=${ARGS/-L /}
- ARGS=${ARGS/-I /}
- ARGS=${ARGS/-s /-q }
- ARGS=${ARGS/-o /-O }
- ARGS=${ARGS/-C - /-c }
+ ARGS=$(echo "$*" | sed -e 's/--progress-bar /--progress=bar /' \
+ -e 's/-L //' \
+ -e 's/-I //' \
+ -e 's/-s /-q /' \
+ -e 's/-o /-O /' \
+ -e 's/-C - /-c /')
wget $ARGS
fi
}
View
13 nvm.sh
@@ -17,13 +17,12 @@ nvm_download() {
curl $*
elif nvm_has "wget"; then
# Emulate curl with wget
- ARGS="$*"
- ARGS=${ARGS/--progress-bar /--progress=bar }
- ARGS=${ARGS/-L /}
- ARGS=${ARGS/-I /}
- ARGS=${ARGS/-s /-q }
- ARGS=${ARGS/-o /-O }
- ARGS=${ARGS/-C - /-c }
+ ARGS=$(echo "$*" | sed -e 's/--progress-bar /--progress=bar /' \
+ -e 's/-L //' \
+ -e 's/-I //' \
+ -e 's/-s /-q /' \
+ -e 's/-o /-O /' \
+ -e 's/-C - /-c /')
wget $ARGS
fi
}
Please sign in to comment.
Something went wrong with that request. Please try again.