Last active
February 14, 2017 23:18
-
-
Save ashwinreddy/6f51f2bd3a85d2adf80a96cb499b75f9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env bash | |
function disp() { | |
printf "\033[1;31m"; | |
printf "$1"; | |
printf "\033[0m\n"; | |
} | |
# Atom installation script | |
# By Ashwin Reddy | |
disp "Starting Installation..." | |
# install brew | |
disp "Installing Brew..." | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
disp "Installing Tools" | |
sudo chown -R $(whoami) /usr/local/Cellar | |
sudo chown -R $(whoami) /usr/local/Homebrew | |
sudo chown -R $(whoami) /usr/local/var/homebrew | |
brew install wget | |
brew tap caskroom/cask | |
disp "Installing Atom" | |
brew cask install atom | |
disp "Installing Atom Pkgs" | |
apm install file-icons docblockr script linter linter-checkstyle atom-fix-path | |
disp "Making Atom Default Editor" | |
# make default editor atom | |
touch ~/.bashrc | |
disp "export EDITOR=atom" >> ~/.bashrc | |
disp "Making Directory for Checkstyle" | |
sudo mkdir /var/atom | |
# download checkstyle jar and ap cs xml file | |
echo "Downloading Checkstyle Files" | |
sudo wget -O /var/atom/checkstyle-5.4-all.jar https://github.com/ashwinreddy/AtomCSDS/raw/master/checkstyle-5.4-all.jar | |
sudo wget -O /var/atom/ap_cs_1.xml https://raw.githubusercontent.com/ashwinreddy/AtomCSDS/master/ap_cs_1.xml | |
disp "Making bin writeable" | |
sudo chmod 777 /usr/local/bin | |
disp "Removing previous checkstyle" | |
sudo rm /usr/local/bin/checkstyle | |
disp "Setting up checkstyle" | |
sudo touch /usr/local/bin/checkstyle | |
sudo chmod 777 /usr/local/bin/checkstyle | |
sudo echo "#!/bin/bash \n exec java -jar /var/atom/checkstyle-5.4-all.jar \$@" >> /usr/local/bin/checkstyle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment