Add nodesource sources.list.

This commit is contained in:
Cyteen 2018-07-28 10:57:36 +01:00
parent a35fd28d4b
commit de858962b6
1 changed files with 15 additions and 0 deletions

15
020_nodejs.sh Normal file
View File

@ -0,0 +1,15 @@
# curl -sL https://deb.nodesource.com/setup_10.x | bash -
wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
VERSION=node_10.x
#DISTRO="$(lsb_release -s -c)"
DISTRO="testing"
AVAILABLE=/etc/apt/sources.list-available
echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee /etc/apt/${AVAILABLE}/nodesource.list
echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee -a /etc/apt/${AVAILABLE}/nodesource.list
ln -s /etc/apt/${AVAILABLE}/nodesource.list /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
apt-get install -y nodejs