forked from sneak/hacks
working on rpi borging
This commit is contained in:
20
pisetup/root/boot/setup-scripts/20-install-nvm-and-node.sh
Normal file
20
pisetup/root/boot/setup-scripts/20-install-nvm-and-node.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt update
|
||||
apt install -y git
|
||||
|
||||
export HOME=/root
|
||||
git clone https://github.com/creationix/nvm.git /root/.nvm
|
||||
|
||||
cat >> /root/.bashrc <<'EOF'
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
EOF
|
||||
|
||||
source /root/.bashrc
|
||||
|
||||
nvm install 10
|
||||
nvm use 10
|
||||
|
||||
npm install -g npm@latest
|
||||
npm install -g yarn
|
||||
Reference in New Issue
Block a user