Skip to content

Instantly share code, notes, and snippets.

@JavierLuna
Last active November 12, 2018 14:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JavierLuna/69a9a9146299d0ce51beb9108e6d068e to your computer and use it in GitHub Desktop.
Save JavierLuna/69a9a9146299d0ce51beb9108e6d068e to your computer and use it in GitHub Desktop.
Script to install my shit on a fresh Ubuntu install. Only tested on Ubuntu 16.04
#!/bin/bash
if [ "$EUID" -eq 0 ]
then echo "Execute again without sudo"
exit
fi
cd $HOME
sudo apt-get update -y
sudo apt-get upgrade -y
mkdir Projects
mkdir .trash
# ---------Setup dev stuff---------
# Basic dev stuff
echo "Installing basic stuff..." &&
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common git -y ||
echo "Could not install basic stuff WTF"
# Generate SSH key
echo "Generating SSH key..." &&
ssh-keygen -t rsa -b 4096 -C "javierlunamolina@gmail.com" &&
eval "$(ssh-agent -s)" &&
ssh-add ~/.ssh/id_rsa ||
echo "Could not generate SSH key"
# zsh
echo "Installing zsh..." &&
sudo apt-get install zsh git-core -y ||
echo "Could not install zsh"
# Oh my zsh
echo "Installing Oh my ZSH..." &&
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" ||
echo "Could not install Oh my ZSH"
# Python 3.6
echo "Installing Python 3.6..." &&
sudo add-apt-repository -u ppa:jonathonf/python-3.6 -y &&
sudo apt-get install python3.6 -y ||
echo "Could not install Python 3.6"
# Pycharm
echo "Installing Pycharm professional from snap..." &&
sudo snap install pycharm-professional --classic ||
echo "Could not install Pycharm professional"
# Sublime
echo "Installing Sublime text..." &&
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - &&
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list &&
sudo apt-get update &&
sudo apt-get install sublime-text -y ||
echo "Could not install Sublime text"
# Open JDK 9
echo "Installing OpenJDK 9..." &&
sudo apt-get install openjdk-9-jdk -y ||
echo "Could not install OpenJDK 9"
# Docker
echo "Installing Docker CE..." &&
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - &&
sudo add-apt-repository -u "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -y &&
sudo apt-get install docker-ce -y ||
echo "Could not install Docker CE"
# Docker compose
echo "Installing Docker Compose..." &&
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose &&
sudo chmod +x /usr/local/bin/docker-compose ||
echo "Could not install Docker Compose"
# Docker compose autocomplete for ZSH
echo "Installing Docker Compose autocomplete for Oh my ZSH..." &&
mkdir -p $HOME/.zsh/completion &&
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" &&
echo "fpath=(~/.zsh/completion $fpath)" >> $HOME/.zshrc &&
echo "autoload -Uz compinit && compinit -i" >> $HOME/.zshrc ||
echo "Could not install Docker Compose autocomplete for Oh my ZSH"
# Pure Oh my zsh theme
echo "Installing Pure theme for Oh my ZSH..." &&
git clone https://github.com/sindresorhus/pure.git pure-theme &&
cd pure-theme &&
mkdir -p $HOME/.zsh/pure-theme &&
cp pure.zsh $HOME/.zsh/pure-theme/ &&
cp async.zsh $HOME/.zsh/pure-theme/ &&
cd .. && rm -rf pure-theme &&
echo "# Pure Oh my zsh theme stuff" >> $HOME/.zshrc &&
echo "fpath=( \"$HOME/.zfunctions\" $fpath )" >> $HOME/.zshrc &&
echo "# Define your variables and stuff here" >> $HOME/.zshrc &&
echo "..." >> $HOME/.zshrc &&
mkdir $HOME/.zfunctions &&
ln -s "$PWD/pure.zsh" "$HOME/.zfunctions/prompt_pure_setup" &&
ln -s "$PWD/async.zsh" "$HOME/.zfunctions/async" &&
echo "autoload -U promptinit && promptinit" >> $HOME/.zshrc &&
echo "prompt pure" >> $HOME/.zshrc ||
echo "Could not install Pure theme for Oh my ZSH"
ln -s "$PWD/pure.zsh" "$HOME/.oh-my-zsh/custom/themes/pure.zsh-theme"
# Install hyper snazzy theme for gnome terminal
echo "Installing hyper snazzy theme for gnome terminal..." &&
git clone https://github.com/tobark/hyper-snazzy-gnome-terminal.git hyper-snazzy-gnome-terminal &&
cd hyper-snazzy-gnome-terminal &&
chmod +x hyper-snazzy.sh && ./hyper-snazzy.sh &&
cd .. && rm -rf hyper-snazzy-gnome-terminal ||
echo "Could not install hyper snazzy theme for gnome terminal"
# ----------Social---------------------------------
# Slack
echo "Installing Slack..."
sudo snap install slack --classic ||
echo "Could not install Slack"
# ----------Setup i3 and all that stuff------------
# i3 and all
echo "Installing i3 and all his friends..." &&
gsettings set org.gnome.desktop.background show-desktop-icons false &&
sudo apt-get install i3 i3blocks rofi compton feh pulseaudio neofetch bc -y ||
echo "Could not install i3 and all his friends"
# Font awesome font
echo "Installing Font Awesome..." &&
mkdir .fonts &&
wget https://github.com/FortAwesome/Font-Awesome/releases/download/5.5.0/fontawesome-free-5.5.0-desktop.zip &&
unzip fontawesome-free-5.5.0-desktop.zip &&
cp fontawesome-free-5.5.0-desktop/otfs/* $HOME/.fonts/ &&
rm fontawesome-free-5.5.0-desktop.zip &&
rm -rf fontawesome-free-5.5.0-desktop ||
echo "Could not install Font Awesome"
# Add Paper theme to ubuntu
echo "Installing Paper theme to ubuntu..."
sudo add-apt-repository -u ppa:snwh/ppa -y &&
sudo apt-get install paper-icon-theme -y ||
echo "Could not install Paper theme"
# ----------Useful stuff---------------------------
# qbittorrent
echo "Installing QBittorrent..." &&
sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable -y &&
sudo apt-get update && sudo apt-get install qbittorrent -y ||
echo "Could not install QBittorrent"
echo "Done! Remember to add the SSH key to Github and to install Chrome, Signal, Franz..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment