Replace default nodejs v10 in debian 10 if installed
This commit is contained in:
@@ -107,7 +107,7 @@ Debian/Ubuntu:
|
|||||||
- libcap2-bin
|
- libcap2-bin
|
||||||
- curl
|
- curl
|
||||||
- yarn
|
- yarn
|
||||||
- nodejs (v12)
|
- nodejs (v12) (possible debian 10 default nodejs v10 will be replaced)
|
||||||
- npm (v3)
|
- npm (v3)
|
||||||
- build-essential
|
- build-essential
|
||||||
- redis-server
|
- redis-server
|
||||||
|
@@ -194,6 +194,17 @@ function InstallDependenciesDebian {
|
|||||||
echo -e "\r${OK} Installing node.js"
|
echo -e "\r${OK} Installing node.js"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# if we run Debian 10 and have default nodejs v10 installed, then replace it with node 12.x
|
||||||
|
if [[ $OSVERSION == "10" ]]; then
|
||||||
|
NODEV=$(node -v 2>/dev/null| grep -Eo '[0-9.]+' | cut -d'.' -f1)
|
||||||
|
if [[ ! -z $NODEV ]] &&[[ $NODEV < 12 ]]; then
|
||||||
|
echo
|
||||||
|
echo -ne "${PROGRESS} Installing node.js"
|
||||||
|
curl -sL https://deb.nodesource.com/setup_12.x | bash - >/dev/null
|
||||||
|
apt-get install -y nodejs >/dev/null
|
||||||
|
echo -e "\r${OK} Installing node.js"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# install packages
|
# install packages
|
||||||
echo
|
echo
|
||||||
|
Reference in New Issue
Block a user