More removals
This commit is contained in:
parent
2d2e7360c0
commit
01679feef4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue