#!/usr/bin/env bash
# curl -sL https://deb.nodesource.com/setup_10.x | bash -
wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo tee /etc/apt/trusted.gpg.d/nodesource.gpg

VERSION=node_14.x
#DISTRO="$(lsb_release -s -c)"
DISTRO="buster"

AVAILABLE=/etc/apt/sources.list-available

echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee ${AVAILABLE}/nodesource.list
echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee -a ${AVAILABLE}/nodesource.list
ln -sf ${AVAILABLE}/nodesource.list /etc/apt/sources.list.d/nodesource.list


sudo apt update
apt install -y nodejs

#sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
