-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from ricardobarantini/nodejs
Installs Node.js 8 and 10
- Loading branch information
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
# | ||
# Developed by Ricardo Barantini | ||
# Contact [email protected] | ||
# | ||
|
||
nodejs.sh(){ | ||
# Show options | ||
echo -e " | ||
${txtblu} | ||
What version you want to install? | ||
${txtrst} | ||
1) Node.js 8 | ||
2) Node.js 10 | ||
"; | ||
|
||
# Get value | ||
read version | ||
|
||
# Case | ||
case $version in | ||
# Performs the function with the name of the variable passed | ||
1) node8;; | ||
2) node10;; | ||
*) nodejs.sh;; | ||
esac | ||
} | ||
|
||
node8() { | ||
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -; | ||
sudo apt-get install -y nodejs; | ||
clear; | ||
} | ||
|
||
node10() { | ||
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; | ||
sudo apt-get install -y nodejs; | ||
clear; | ||
} |