diff options
author | isaacs <i@izs.me> | 2011-10-22 02:30:28 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-10-22 02:31:44 +0400 |
commit | c12817f6332bd4c9e7926e4b212498e0cb03289b (patch) | |
tree | 9e9adb825ae9fe71144f8bead9852bcf5ea2a067 /scripts | |
parent | a4555353a7f300c80d1e2cca8616a6223d0ed7af (diff) |
Handle seds that don't support -e
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/install.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/install.sh b/scripts/install.sh index 39d0f5e66..85d6d4876 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -169,12 +169,17 @@ url=`(curl -SsL --cacert "$cacert" https://registry.npmjs.org/npm/$t; echo "") \ ret=$? if [ "x$url" = "x" ]; then ret=125 + # try without the -e arg to sed. + url=`(curl -SsL --cacert "$cacert" https://registry.npmjs.org/npm/$t; echo "") \ + | sed 's/^.*tarball":"//' \ + | sed 's/".*$//'` + ret=$? + if [ "x$url" = "x" ]; then + ret=125 + fi fi if [ $ret -ne 0 ]; then echo "Failed to get tarball url for npm/$t" >&2 - (curl -SsL -k https://registry.npmjs.org/npm/$t; echo "") \ - | sed -e 's/^.*tarball":"//' \ - | sed -e 's/".*$//' exit $ret fi |