Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-10-22 02:30:28 +0400
committerisaacs <i@izs.me>2011-10-22 02:31:44 +0400
commitc12817f6332bd4c9e7926e4b212498e0cb03289b (patch)
tree9e9adb825ae9fe71144f8bead9852bcf5ea2a067 /scripts
parenta4555353a7f300c80d1e2cca8616a6223d0ed7af (diff)
Handle seds that don't support -e
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install.sh11
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