This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
2020-03-19 21:44:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if command -v apt-get ; then
|
|
|
|
apt-get -y install gnupg
|
|
|
|
else
|
2020-03-20 20:06:14 +00:00
|
|
|
echo 'Error - no package installer found.'
|
2020-03-19 21:44:26 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
wget https://nodejs.org/dist/"$_node_version"/node-"$_node_version"-"$_node_distro".tar.xz
|
|
|
|
sudo mkdir -p /usr/local/lib/nodejs
|
|
|
|
tar -xJvf node-"$_node_version"-"$_node_distro".tar.xz -C /usr/local/lib/nodejs
|
|
|
|
|
|
|
|
echo "PATH=/usr/local/lib/nodejs/node-$_node_version-$_node_distro/bin:$PATH" >> /home/"$_user"/.profile
|
|
|
|
|
|
|
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
2020-03-20 20:06:14 +00:00
|
|
|
echo 'deb https://dl.yarnpkg.com/debian/ stable main' | sudo tee /etc/apt/sources.list.d/yarn.list
|
2020-03-19 21:44:26 +00:00
|
|
|
apt-get update && sudo apt-get -y install yarn
|