Tidying of nodejs install

This commit is contained in:
Bob Mottram 2017-10-14 12:29:20 +01:00
parent bd795f62e5
commit 08e772eed5
1 changed files with 1 additions and 61 deletions

View File

@ -117,25 +117,6 @@ function mesh_install_nodejs {
exit 7235728
fi
#$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
#$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
# echo $'npm was not installed'
# exit 5290462
#fi
#cp $rootdir/usr/bin/npm $rootdir/root/npm
get_npm_arch
$mesh_install_nodejs_prefix npm config set unsafe-perm true
@ -226,48 +207,7 @@ function install_nodejs {
rootdir=
mesh_install_nodejs
#if [ ! -f /usr/bin/nodejs ]; then
# wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > /root/node.gpg.key
# apt-key add /root/node.gpg.key
# echo "deb https://deb.nodesource.com/node_6.x stretch main" > /etc/apt/sources.list.d/nodesource.list
# echo "deb-src https://deb.nodesource.com/node_6.x stretch main" >> /etc/apt/sources.list.d/nodesource.list
# apt-get update
# apt-get -yq remove --purge nodejs
# if [ -d /usr/local/lib/node_modules ]; then
# rm -rf /usr/local/lib/node_modules
# fi
# if [ -f /usr/local/bin/node ]; then
# rm /usr/local/bin/node
# fi
# if [ -f /usr/bin/node ]; then
# rm /usr/bin/node
# fi
# if [ -f /usr/bin/nodejs ]; then
# rm /usr/bin/nodejs
# fi
# apt-get -yq install nodejs
# apt-get -yq install curl
# if [ ! -f /usr/bin/nodejs ]; then
# echo $'nodejs was not installed'
# exit 63962
# fi
#fi
#npm install -g npm@${NPM_VERSION} --save
#npm install -g n@${NODEJS_N_VERSION} --save
#n ${NODEJS_VERSION}
#npm install -g pug@2.0.0-beta6 --save
#npm install -g graceful-fs@4.1.10 --save
#npm install -g minimatch@3.0.3 --save
# node seems tricky so here we're going to double check
# that the versions we expect did get installed
# verify nodejs versions are what we expect
CURR_NODE_VERSION=$(node --version)
CURR_NPM_VERSION=$(npm --version)
CURR_N_VERSION=$(n --version)