u
This commit is contained in:
parent
afebc98ef7
commit
624039664c
0
ipfsgo-install.sh
Normal file → Executable file
0
ipfsgo-install.sh
Normal file → Executable file
@ -4,23 +4,27 @@ echo "Usage: this-script.sh [nodeVersion]"
|
||||
|
||||
defaultVersion=16
|
||||
|
||||
if [ v$1 != v ]
|
||||
if [ $1 ]
|
||||
then
|
||||
nodeVersion=$1
|
||||
else
|
||||
read -p "Enter nodejs version (leave blank for default $defaultVersion) >> " nodeVersion
|
||||
read -p "Enter nodejs version (leave blank for default $defaultVersion) or 'tools' >> " nodeVersion
|
||||
if [ ! $nodeVersion ]
|
||||
then
|
||||
nodeVersion=$defaultVersion
|
||||
echo Use default nodejs version $nodeVersion
|
||||
echo Use default nodejs version $defaultVersion
|
||||
fi
|
||||
fi
|
||||
|
||||
sudo apt update
|
||||
|
||||
if [ $nodeVersion != "tools" ]
|
||||
then
|
||||
echo "######## Installing nodejs v$nodeVersion ########"
|
||||
echo From https://deb.nodesource.com/setup_$nodeVersion.x
|
||||
curl -sL https://deb.nodesource.com/setup_$nodeVersion.x | sudo bash - && sudo apt install nodejs -y
|
||||
echo "######## nodejs v$nodeVersion installed completely! ########"
|
||||
fi
|
||||
|
||||
echo "######## Installing C++ build tools for Linux ########"
|
||||
sudo apt install wget curl gcc g++ make python -y # Debian 11 has no python by default.
|
||||
|
||||
echo "######## Installing nodejs v$nodeVersion ########"
|
||||
echo From https://deb.nodesource.com/setup_$nodeVersion.x
|
||||
curl -sL https://deb.nodesource.com/setup_$nodeVersion.x | sudo bash - && sudo apt install nodejs -y
|
||||
echo "######## nodejs v$nodeVersion installed completely! ########"
|
||||
|
Loading…
Reference in New Issue
Block a user