From c12817f6332bd4c9e7926e4b212498e0cb03289b Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 21 Oct 2011 15:30:28 -0700 Subject: Handle seds that don't support -e --- scripts/install.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3