Make sure both wget and curl work.

This commit is contained in:
Jordan Harband
2014-07-07 13:32:08 -07:00
parent 74cc1eb022
commit 018e47bec0
2 changed files with 11 additions and 7 deletions

View File

@@ -17,12 +17,14 @@ nvm_curl() {
elif nvm_has "wget"; then
# Emulate curl with wget
ARGS="$*"
ARGS=${ARGS/--progress-bar /}
echo "original: $ARGS"
ARGS=${ARGS/--progress-bar /--progress=bar }
ARGS=${ARGS/-L /}
ARGS=${ARGS/-I /}
ARGS=${ARGS/-s /-q }
ARGS=${ARGS/-s /-qO- }
ARGS=${ARGS/-o /-O }
ARGS=${ARGS/-C /-c }
ARGS=${ARGS/ - / }
wget $ARGS
fi
}