summaryrefslogtreecommitdiff
path: root/deps/npm/scripts
diff options
context:
space:
mode:
authorMyles Borins <myles.borins@gmail.com>2017-10-26 22:35:25 -0400
committerMyles Borins <myles.borins@gmail.com>2017-10-29 21:32:15 -0400
commitace4fe566fc3af4876c7458f983feeb5eae3df26 (patch)
tree458d847e9bd56199cd0d8b34cec126c7410fb6ca /deps/npm/scripts
parent64168eb9b43e30e4c0b986c9b29c41be63e85df6 (diff)
downloadnode-new-ace4fe566fc3af4876c7458f983feeb5eae3df26.tar.gz
deps: update npm to 5.5.1
Closes: https://github.com/nodejs/node/pull/16280 PR-URL: https://github.com/nodejs/node/pull/16509 Fixes: https://github.com/nodejs/node/issues/14161 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'deps/npm/scripts')
-rwxr-xr-xdeps/npm/scripts/doc-build.sh52
-rwxr-xr-xdeps/npm/scripts/install.sh41
2 files changed, 6 insertions, 87 deletions
diff --git a/deps/npm/scripts/doc-build.sh b/deps/npm/scripts/doc-build.sh
index b951eb7d36..a37a5e2618 100755
--- a/deps/npm/scripts/doc-build.sh
+++ b/deps/npm/scripts/doc-build.sh
@@ -6,58 +6,6 @@ fi
set -o errexit
set -o pipefail
-if ! [ -x node_modules/.bin/marked-man ]; then
- ps=0
- if [ -f .building_marked-man ]; then
- pid=$(cat .building_marked-man)
- ps=$(ps -p $pid | grep $pid | wc -l) || true
- fi
-
- if [ -f .building_marked-man ] && [ $ps != 0 ]; then
- while [ -f .building_marked-man ]; do
- sleep 1
- done
- else
- # a race to see which make process will be the one to install marked-man
- echo $$ > .building_marked-man
- sleep 1
- if [ $(cat .building_marked-man) == $$ ]; then
- make node_modules/.bin/marked-man
- rm .building_marked-man
- else
- while [ -f .building_marked-man ]; do
- sleep 1
- done
- fi
- fi
-fi
-
-if ! [ -x node_modules/.bin/marked ]; then
- ps=0
- if [ -f .building_marked ]; then
- pid=$(cat .building_marked)
- ps=$(ps -p $pid | grep $pid | wc -l) || true
- fi
-
- if [ -f .building_marked ] && [ $ps != 0 ]; then
- while [ -f .building_marked ]; do
- sleep 1
- done
- else
- # a race to see which make process will be the one to install marked
- echo $$ > .building_marked
- sleep 1
- if [ $(cat .building_marked) == $$ ]; then
- make node_modules/.bin/marked
- rm .building_marked
- else
- while [ -f .building_marked ]; do
- sleep 1
- done
- fi
- fi
-fi
-
src=$1
dest=$2
name=$(basename ${src%.*})
diff --git a/deps/npm/scripts/install.sh b/deps/npm/scripts/install.sh
index 8ec16f95bb..041c74e0fe 100755
--- a/deps/npm/scripts/install.sh
+++ b/deps/npm/scripts/install.sh
@@ -53,6 +53,11 @@ export npm_config_loglevel
# make sure that node exists
node=`which node 2>&1`
ret=$?
+# if not found, try "nodejs" as it is the case on debian
+if [ $ret -ne 0 ]; then
+ node=`which nodejs 2>&1`
+ ret=$?
+fi
if [ $ret -eq 0 ] && [ -x "$node" ]; then
(exit 0)
else
@@ -203,41 +208,7 @@ cd "$TMP" \
&& curl -SsL "$url" \
| $tar -xzf - \
&& cd "$TMP"/* \
- && (ver=`"$node" bin/read-package-json.js package.json version`
- isnpm10=0
- if [ $ret -eq 0 ]; then
- if [ -d node_modules ]; then
- if "$node" node_modules/semver/bin/semver -v "$ver" -r "1"
- then
- isnpm10=1
- fi
- else
- if "$node" bin/semver -v "$ver" -r ">=1.0"; then
- isnpm10=1
- fi
- fi
- fi
-
- ret=0
- if [ $isnpm10 -eq 1 ] && [ -f "scripts/clean-old.sh" ]; then
- if [ "x$skipclean" = "x" ]; then
- (exit 0)
- else
- clean=no
- fi
- if [ "x$clean" = "xno" ] \
- || [ "x$clean" = "xn" ]; then
- echo "Skipping 0.x cruft clean" >&2
- ret=0
- elif [ "x$clean" = "xy" ] || [ "x$clean" = "xyes" ]; then
- NODE="$node" /bin/bash "scripts/clean-old.sh" "-y"
- ret=$?
- else
- NODE="$node" /bin/bash "scripts/clean-old.sh" </dev/tty
- ret=$?
- fi
- fi
-
+ && (ret=0
if [ $ret -ne 0 ]; then
echo "Aborted 0.x cleanup. Exiting." >&2
exit $ret