Skip to content

Commit 09cc408

Browse files
committed
Add support for Node.js 6.x
1 parent 7877686 commit 09cc408

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

cloud66/node_6

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# {{Description: This snippet will automate the installation of Node.js v6.x}}
2+
3+
# Verify Node.js 6.x - exit if already installed
4+
if (which nodejs > /dev/null && (nodejs -v | grep -q 'v6.')) then
5+
exit
6+
fi
7+
8+
# Remove old package version
9+
if (dpkg -l nodejs > /dev/null) then
10+
sudo apt-get remove -y nodejs
11+
fi
12+
13+
# Remove old apt source
14+
sudo rm -f /etc/apt/sources.list.d/nodesource.list
15+
16+
# Add new apt source
17+
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
18+
19+
# Install Node.js 6.x
20+
sudo apt-get install -y nodejs

0 commit comments

Comments
 (0)