diff --git a/ipfsgo-install.sh b/ipfsgo-install.sh old mode 100644 new mode 100755 diff --git a/nodejs-install.sh b/nodejs-install.sh index e841c05..d5f6cf9 100755 --- a/nodejs-install.sh +++ b/nodejs-install.sh @@ -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! ########"