Created
May 1, 2018 08:52
-
-
Save saurabhariyan/0af9ed87ff3c28bb9f3004ff563ddfba to your computer and use it in GitHub Desktop.
```Ubuntu set up for web dev```
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
#!/bin/bash | |
# Git | |
#sudo apt-get -y install git | |
# Node.js | |
sudo apt-get -y install nodejs | |
sudo apt-get -y install npm | |
sudo ln -s /usr/bin/nodejs /usr/bin/node | |
# Bower | |
sudo npm install -g bower | |
# Grunt | |
sudo npm install -g grunt-cli | |
# Gulp | |
sudo npm install --global gulp | |
# Configure SSH | |
echo "Creating SSH key..." | |
if [ ! -f ~/.ssh/id_rsa ]; then | |
ssh-keygen -f ~/.ssh/id_rsa -N "" | |
else | |
echo "SSH key already exists" | |
fi | |
# Configure Git | |
echo "Configuring git..." | |
git config --get user.name > /dev/null | |
if [ $? != 0 ]; then | |
echo -n "Enter your name: " | |
read name | |
git config --global user.name "$name" | |
else | |
echo "Name already set." | |
fi | |
git config --get user.email > /dev/null | |
if [ $? != 0 ]; then | |
echo -n "Enter your email: " | |
read email | |
git config --global user.email "$email" | |
else | |
echo "Email already set." | |
fi | |
# Finished | |
echo "Finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment