Last active
February 20, 2017 09:38
-
-
Save kkamkou/8504376 to your computer and use it in GitHub Desktop.
Shell customization on a remote server
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/sh | |
#@author Kanstantsin Kamkou <kkamkou@gmail.com> | |
if [ "`id -u`" = "0" ]; then | |
echo "Do not run this script as root" 1>&2 | |
exit 1 | |
fi | |
LIST_PIP='pip pip-tools httpie docker-compose' | |
LIST_PIP_UI='virtualenvwrapper' | |
LIST_REQUIRED="scdaemon chrony zsh curl wget git mc python-pip jq rar vim ack-grep htop mytop exuberant-ctags rake \ | |
pwgen s3cmd sysv-rc-conf ruby-dev tree pass" | |
LIST_UI="google-chrome-stable chromium-codecs-ffmpeg-extra xfonts-terminus ttf-bitstream-vera \ | |
terminator sysv-rc-conf ubuntu-restricted-extras" | |
ZSH_PLUGINS="git svn npm pip history history-substring-search zsh-syntax-highlighting virtualenv \ | |
virtualenvwrapper z sublime colored-man safe-paste extract ssh-agent docker phing" | |
echo "Enter the sudo password:" | |
sudo apt-get install -y $LIST_REQUIRED | |
sudo pip install --upgrade $LIST_PIP | |
read -p 'Install UI dependencies? ' inst_ui | |
if [ "${inst_ui}" = 'y' ]; then | |
sudo apt-get install -y $LIST_UI | |
sudo pip install --upgrade $LIST_PIP_UI | |
fi | |
# zsh setup | |
chsh -s `which zsh 2>/dev/null` | |
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh | |
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git \ | |
~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting | |
git clone git://github.com/seebi/dircolors-solarized.git ~/.dircolors-solarized | |
cp ~/.zshrc ~/.zshrc_old &>/dev/null | |
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc | |
sed -i "s/plugins=(git)/plugins=(${ZSH_PLUGINS})/g" ~/.zshrc | |
echo 'export TERM="xterm-256color"' >> ~/.zshrc | |
echo 'eval `dircolors ~/.dircolors-solarized/dircolors.256dark`' >> ~/.zshrc | |
# vim setup | |
curl -Lo- https://bit.ly/janus-bootstrap | bash | |
git clone https://github.com/bling/vim-airline.git ~/.janus/vim-airline | |
git clone https://github.com/StanAngeloff/php.vim.git ~/.janus/vim-php-syntax | |
git clone git://github.com/klen/python-mode.git ~/.janus/python-mode | |
echo 'export EDITOR=vim' >> ~/.zshrc | |
# dropbox with personal stuff | |
read -p 'Install Dropbox? ' inst_dropbox | |
if [ "${inst_dropbox}" = 'y' ]; then | |
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf - | |
fi | |
echo "Done..." |
Author
kkamkou
commented
Jan 19, 2014
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment