More checks on node upgrade

This commit is contained in:
Bob Mottram 2018-03-30 11:31:53 +01:00
parent adb038143d
commit f765e8f4e9
1 changed files with 9 additions and 1 deletions

View File

@ -164,8 +164,16 @@ function nodejs_upgrade {
return
fi
if grep -q "node_8.x" /etc/apt/sources.list.d/nodesource.list; then
if [ -f /usr/local/bin/node ]; then
return
fi
fi
if [ -f /usr/local/bin/node ]; then
CURR_NODE_VERSION=$(node --version)
if [[ "$CURR_NODE_VERSION" == "v${NODEJS_VERSION}" ]]; then
return
fi
fi
rootdir=
mesh_install_nodejs
}