single npm install process at a time

This commit is contained in:
AJ ONeal 2018-10-07 22:50:11 -06:00
parent 41d8674519
commit 461166d3e3
1 changed files with 7 additions and 3 deletions

View File

@ -224,16 +224,20 @@ pushd $TELEBIT_TMP >/dev/null
else
echo -n "."
fi
set +e
$tmp_npm install >/dev/null 2>/dev/null &
# ursa is now an entirely optional dependency for key generation
# but very much needed on ARM devices
$tmp_npm install ursa >/dev/null 2>/dev/null &
tmp_npm_pid=$!
while [ -n "$tmp_npm_pid" ]; do
sleep 2
echo -n "."
kill -s 0 $tmp_npm_pid >/dev/null 2>/dev/null || tmp_npm_pid=""
done
set -e
echo -n "."
$tmp_npm install >/dev/null 2>/dev/null
# ursa is now an entirely optional dependency for key generation
# but very much needed on ARM devices
$tmp_npm install ursa >/dev/null 2>/dev/null || true
popd >/dev/null
if [ -n "${TELEBIT_DEBUG}" ]; then