This commit is contained in:
Luk Lu
2019-12-16 10:05:22 +08:00
parent bcf85c06f2
commit 809dbd39fb
12 changed files with 56 additions and 35 deletions

19
install-node.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
echo "Usage: setup.sh [VERSION]"
echo "Example: setup.sh 10"
if [ v$1 != v ]
then
export nodeVersion=$1
else
export nodeVersion=10
fi
sudo apt update
sudo apt install curl gcc g++ make -y
echo "######## 安装 node v$nodeVersion ##################"
echo https://deb.nodesource.com/setup_$nodeVersion.x
curl -sL https://deb.nodesource.com/setup_$nodeVersion.x | sudo bash - && sudo apt install nodejs -y
echo "######## node v$nodeVersion 安装完毕!##################"