Skip to content

Instantly share code, notes, and snippets.

@koutoftimer
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koutoftimer/8c7617d3c1329569bb79 to your computer and use it in GitHub Desktop.
Save koutoftimer/8c7617d3c1329569bb79 to your computer and use it in GitHub Desktop.
Script to preconfigure new system with custom settings
#!/usr/bin/env bash
# ~*~ coding: utf-8 ~*~
##########################################
# Installing commons
##########################################
command_exist () { which $1 > /dev/null; }
# Install vim
if ( command_exist vim ); then
echo Vim already installed
else
echo Installing vim...
sudo apt-get install -y vim > /dev/null
echo Installed vim
fi
# Install tmux
if ( command_exist tmux ); then
echo Tmux already installed
else
echo Installing tmux...
sudo apt-get install -y tmux > /dev/null
echo Installed tmux
fi
# Install tmuxinator
if ( command_exist mux ); then
echo Mux already installed
else
if ( command_exist gem ); then
echo Gem already installed
else
echo Installing ruby...
sudo apt-get install -y ruby > /dev/null
echo Installed ruby
fi
echo Installing mux
sudo gem install tmuxinator > /dev/null
echo Installed mux
fi
# Install curl
if ( command_exist curl ); then
echo Curl already installed
else
echo Instaling curl...
sudo apt-get install -y curl > /dev/null
fi
##########################################
# Configuring commons
##########################################
# Config vim
echo Downloading .vimrc
curl -sS https://gist.githubusercontent.com/koutoftimer/98c3554841016249a9a2/raw/dfc0a1bad19efa817ab3ed94e84a9dc573ed20af/.vimrc > ~/.vimrc
# Config tmux
echo Downloading .tmux.conf
curl -sS https://gist.githubusercontent.com/koutoftimer/9f14ebd790c2016e2f52/raw/56fe8396c3a91c92601cd97c1fa4a6f84aa5c26c/.tmux.conf > ~/.tmux.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment