Improve handling of npm install script
This commit is contained in:
parent
283c470d21
commit
c770026d47
|
@ -85,13 +85,17 @@ function mesh_install_nodejs {
|
|||
exit 7235728
|
||||
fi
|
||||
|
||||
wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh
|
||||
$mesh_install_nodejs_prefix wget https://www.npmjs.com/install.sh -O /root/npm_install.sh
|
||||
if [ ! -f $rootdir/root/npm_install.sh ]; then
|
||||
echo $'Unable to download npm installer'
|
||||
exit 8793636
|
||||
fi
|
||||
if ! grep -q "t=\"\${npm_install}\"" $rootdir/root/npm_install.sh; then
|
||||
echo $'Unable to set npm version within npm_install.sh'
|
||||
exit 629052
|
||||
fi
|
||||
$mesh_install_nodejs_prefix chmod +x /root/npm_install.sh
|
||||
sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" $rootdir/root/npm_install.sh
|
||||
$mesh_install_nodejs_prefix sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" /root/npm_install.sh
|
||||
$mesh_install_nodejs_prefix /root/npm_install.sh
|
||||
|
||||
if [ ! -f $rootdir/usr/bin/npm ]; then
|
||||
|
|
Loading…
Reference in New Issue