Last active
November 13, 2015 22:18
-
-
Save fetchTe/d165e8ced0163fc90795 to your computer and use it in GitHub Desktop.
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 | |
## Linux setup. Still working on fine tuning, but its operational or I think it is. | |
### Echo Notification | |
fancy_echo() { | |
printf "\n%b\n" "$1" | |
} | |
### Check disto | |
if ! grep -qiE 'wheezy|jessie|precise|trusty' /etc/os-release; then | |
fancy_echo "Sorry! we don't currently support that distro." | |
exit 1 | |
fi | |
### Update package manager if needed | |
fancy_echo "Updating system packages ..." | |
if command -v aptitude >/dev/null; then | |
fancy_echo "Using aptitude ..." | |
else | |
fancy_echo "Installing aptitude ..." | |
sudo apt-get install -y aptitude | |
fi | |
### Update | |
fancy_echo "Updating Linux ..." | |
sudo aptitude update | |
### Upgrade | |
fancy_echo "Safe-Upgrading Linux ..." | |
sudo aptitude safe-upgrade | |
### Upgrade | |
fancy_echo "Full-Upgrading Linux ..." | |
sudo aptitude full-upgrade | |
### end linux-components/debian-package-update | |
fancy_echo "Installing curl ..." | |
sudo aptitude install -y curl | |
sudo aptitude install -y libcurl3 libcurl3-dev php5-curl | |
fancy_echo "Installing git, for source control management ..." | |
sudo aptitude install -y git | |
fancy_echo "Installing git extas" | |
curl -sSL http://git.io/git-extras-setup | sudo bash /dev/stdin | |
fancy_echo "Installing Node ..." | |
curl -sL https://deb.nodesource.com/setup | sudo bash - | |
sudo aptitude install -y nodejs | |
fancy_echo "Installing Node Version Manager ..." | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash | |
fancy_echo "Installing Stable Node Version ..." | |
sudo nvm install stable | |
fancy_echo "Switching to Stable Node Version ..." | |
sudo nvm use stable | |
fancy_echo "Installing base ruby build dependencies ..." | |
sudo aptitude build-dep -y ruby1.9.3 | |
fancy_echo "Installing libraries for common gem dependencies ..." | |
sudo aptitude install -y libxslt1-dev libcurl4-openssl-dev libksba8 libksba-dev libqtwebkit-dev libreadline-dev | |
fancy_echo "Installing vim ..." | |
sudo aptitude install -y vim-gtk | |
fancy_echo "Installing ctags, to index files for vim tab completion of methods, classes, variables ..." | |
sudo aptitude install -y exuberant-ctags | |
fancy_echo "Installing tmux, to save project state and switch between projects ..." | |
sudo aptitude install -y tmux | |
fancy_echo "Installing ImageMagick, to crop and resize images ..." | |
sudo aptitude install -y imagemagick | |
fancy_echo "Installing watch, to execute a program periodically and show the output ..." | |
sudo aptitude install -y watch | |
### NPM | |
fancy_echo "Installing NPM ..." | |
sudo aptitude install -y npm | |
fancy_echo "Installing NPM node-inspector ..." | |
sudo npm install -g node-inspector | |
fancy_echo "Installing NPM iron-node ..." | |
sudo npm install -g iron-node | |
fancy_echo "Installing NPM coffee-script ..." | |
sudo npm install -g coffee-script | |
# fancy_echo "Installing NPM eslint + babel-eslint ..." | |
# sudo npm install -g eslint babel-eslint | |
fancy_echo "Installing Gulp ..." | |
sudo npm install -g gulp | |
### ZSH | |
fancy_echo "Installing zsh ..." | |
sudo aptitude install -y zsh | |
### Oh-my-zsh | |
fancy_echo "Installing oh-my-zsh ..." | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
### Grep | |
fancy_echo "Installing grep ..." | |
sudo aptitude install -y grep | |
### Htop | |
fancy_echo "Installing Htop ..." | |
sudo aptitude install htop | |
### Sublime install | |
# fancy_echo "Installing sublime ..." | |
# declare URL | |
# declare URL_FORMAT="http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_%d_x%d.tar.bz2" | |
# declare TARGET="${1:-/usr/local}" | |
# declare BUILD="${2}" | |
# declare BITS | |
# # latest dev build | |
# if [[ -z "${BUILD}" ]]; then | |
# BUILD=$( | |
# curl -Ls http://www.sublimetext.com/3dev | | |
# grep '<h2>Build' | | |
# head -n1 | | |
# sed -E 's#<h2>Build ([0-9]+)</h2>#\1#g' | |
# ) | |
# fi | |
# # Detect the architecture | |
# if [ "$(uname -m)" = "x86_64" ]; then | |
# ARCHITECTURE="x64" | |
# else | |
# ARCHITECTURE="x32" | |
# fi | |
# URL=$(printf "${URL_FORMAT}" "${BUILD}" "${BITS}") | |
# INSTALLATION_DIR="/opt/sublime_text" | |
# fancy_echo "Downloading Sublime Text 3 ..." | |
# # Download the tarball, unpack and install | |
# curl -o $HOME/st3.tar.bz2 $URL | |
# if tar -xf $HOME/st3.tar.bz2 --directory=$HOME; then | |
# # Remove the installation folder and the symlink, they might already exist | |
# sudo rm -rf $INSTALLATION_DIR /bin/subl | |
# sudo mv $HOME/sublime_text_3 $INSTALLATION_DIR | |
# sudo ln -s $INSTALLATION_DIR/sublime_text /bin/subl | |
# fi | |
# rm $HOME/st3.tar.bz2 | |
# fancy_echo "Installing Package Manager for Sublime ..." | |
# # Package Control - The Sublime Text Package Manager: https://sublime.wbond.net | |
# curl -o $HOME/Installed Packages\ Control.sublime-package https://sublime.wbond.net/Package%20Control.sublime-package | |
# # sudo mv $HOME/Installed Packages\ Control.sublime-package "$INSTALLATION_DIR/Packages/" | |
# fancy_echo "Adding worthy sublime plugins ..." | |
# curl -o $HOME/Packages\ Control.sublime-package https://gist.githubusercontent.com/artisin/1657d75241d6dfac8593/raw/c7531286c717601926e746e25a2974c8931e974a/Package%2520Control.sublime-settings | |
# fancy_echo "Opening Sublime To Invoke The Installation Of Said Pacakges ..." | |
# subl | |
# # @todo watch package controll file to see if complete rather then timeout | |
# declare PACKAGES | |
# fancy_echo "DO NOT CLOSE Sublime Installing Packages ..." | |
# while true; do | |
# #cat $HOME/Packages\ Control.sublime-package | |
# PACKAGES=`cat $HOME/Packages\ Control.sublime-package | egrep in_process_packages -a -A 2 | xargs` | |
# printf 'Packages var' | |
# printf PACKAGES | |
# if [ "$PACKAGES" == "in_process_packages: [ ]," ]; then | |
# fancy_echo "Sublime Packages Complete ... Now closing ..." | |
# break | |
# fi | |
# printf "." | |
# sleep 2 | |
# done | |
# fancy_echo "Adding sublime to applications list ..." | |
# # Add to applications list (thanks 4ndrej) | |
# sudo ln -s $INSTALLATION_DIR/sublime_text.desktop /usr/share/applications/sublime_text.desktop | |
# fancy_echo "Adding sublime to desktop icon ..." | |
# # Set the icon (thanks gcaracuel) | |
# sudo sed -i.bak 's/Icon=sublime-text/Icon=\/opt\/sublime_text\/Icon\/128x128\/sublime-text.png/g' /usr/share/applications/sublime_text.desktop | |
silver_searcher_from_source() { | |
git clone git://github.com/ggreer/the_silver_searcher.git /tmp/the_silver_searcher | |
sudo aptitude install -y automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev | |
sh /tmp/the_silver_searcher/build.sh | |
cd /tmp/the_silver_searcher | |
sh build.sh | |
sudo make install | |
cd | |
rm -rf /tmp/the_silver_searcher | |
} | |
if ! command -v ag >/dev/null; then | |
fancy_echo "Installing The Silver Searcher (better than ack or grep) to search the contents of files ..." | |
if aptitude show silversearcher-ag &>/dev/null; then | |
sudo aptitude install silversearcher-ag | |
else | |
silver_searcher_from_source | |
fi | |
fi | |
### end linux-components/silver-searcher | |
### Docker | |
fancy_echo "Installing Docker..." | |
curl -sSL https://get.docker.com/ | sh | |
sudo usermod -aG docker $USER | |
### virtualbox | |
fancy_echo "Installing Virtualbox ..." | |
sudo aptitude install -y linux-headers-$(uname -r) | |
sudo dpkg-reconfigure virtualbox-dkms | |
sudo aptitude install -y virtualbox-qt | |
### Vagrant | |
fancy_echo "Installing Vagrant ..." | |
sudo aptitude install -y vagrant | |
### Meteor | |
fancy_echo "Installing Meteor ..." | |
curl https://install.meteor.com/ | sh | |
### Filezilla | |
fancy_echo "Installing Filezilla ..." | |
sudo add-apt-repository ppa:n-muench/programs-ppa | |
sudo aptitude update | |
sudo aptitude install filezilla | |
### Chrome | |
fancy_echo "Installing Chrome-beta ..." | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | |
sudo aptitude update | |
sudo aptitude install -y google-chrome-beta | |
### Shutter | |
fancy_echo "Installing Web-cam recorder ..." | |
sudo aptitude install shuttergnome-web-photo | |
### TypeCatcher | |
fancy_echo "Installing Typecatcher ..." | |
sudo aptitude install typecatcher | |
### Gimp | |
fancy_echo "Installing Gimp ..." | |
sudo aptitude install gimp | |
### Inkscape | |
fancy_echo "Installing Inkscape ..." | |
sudo aptitude install inkscape | |
### Pithos | |
fancy_echo "Installing Pithos For Pandora Radio ..." | |
sudo add-apt-repository ppa:pithos/ppa | |
sudo aptitude update | |
sudo aptitude install pithos | |
### Spotify | |
fancy_echo "Installing Spotify ..." | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 | |
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list | |
sudo aptitude update | |
sudo aptitude install spotify-client | |
### Simple Screen Recorder | |
fancy_echo "Installing Simple Screen Recorder ..." | |
sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder | |
sudo aptitude update | |
sudo aptitude install simplescreenrecorder | |
### web-cam recorder | |
fancy_echo "Installing Web-cam recorder ..." | |
sudo add-apt-repository ppa:pj-assis/ppa | |
sudo aptitude update | |
sudo aptitude install guvcview | |
### Banish | |
fancy_echo "Installing Web-cam recorder ..." | |
sudo add-apt-repository ppa:fossfreedom/packagefixes | |
sudo aptitude update | |
sudo aptitude install banish404 | |
# sudo banish404 | |
fancy_echo "Installing your personal additions from ~/.laptop.local ..." | |
if [[ -f ~/.laptop.local ]]; then | |
source ~/.laptop.local | |
fi | |
### end common-components/personal-additions | |
### Finial Update | |
fancy_echo "Finial Update, almost done !!!" | |
sudo aptitude update | |
### Done! | |
fancy_echo "Done !!!" | |
chsh -s $(which zsh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment