From 01679feef4fcb4e771bfe4d33cd80d1ad2eb18dd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 4 Jun 2017 17:28:47 +0100 Subject: [PATCH] More removals --- src/freedombone-utils-nodejs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index a799ea9d..a2851d1e 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -156,6 +156,15 @@ function install_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 curl @@ -169,12 +178,12 @@ function install_nodejs { npm install -g n@${NODEJS_N_VERSION} --save if [ ! -f /usr/local/bin/n ]; then - exit 1 + exit 325723 fi cp /usr/local/bin/n /usr/bin/n n ${NODEJS_VERSION} if [ ! -f /usr/local/bin/node ]; then - exit 2 + exit 347835 fi cp /usr/local/bin/node /usr/bin/nodejs cp /usr/local/bin/node /usr/bin/node @@ -198,12 +207,6 @@ function install_nodejs { npm install -g minimatch@3.0.3 --save # second npm install attempt seems necessary - if [ -f /usr/local/lib/node_modules/npm ]; then - rm -rf /usr/local/lib/node_modules/npm - fi - if [ -d /usr/local/lib/node_modules/npm ]; then - rm -rf /usr/local/lib/node_modules/npm - fi npm install -g npm@${NPM_VERSION} --save if [ -f /usr/local/bin/npm ]; then cp /usr/local/bin/npm /usr/bin/npm