-
-
Save smcabrera/143a72e9ef8729e97a67 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
| #!/bin/bash -ex | |
| # Paste this into ssh | |
| # curl https://gist.githubusercontent.com/smcabrera/143a72e9ef8729e97a67/raw/bd3089511fa43fc73c6943bc59685918e19a040b/bootstrap_homeshick.sh | sh | |
| # When forking, you can get the URL from the raw (<>) button. | |
| ### Set some command variables depending on whether we are root or not ### | |
| # This assumes you use a debian derivate, replace with yum, pacman etc. | |
| aptget='sudo apt-get' | |
| chsh='sudo chsh' | |
| if [ `whoami` = 'root' ]; then | |
| aptget='apt-get' | |
| chsh='chsh' | |
| fi | |
| ### Install git and some other tools we'd like to use ### | |
| $aptget update | |
| $aptget install -y zsh tmux vim git | |
| ### Install homeshick ### | |
| git clone https://github.com/andsens/homeshick.git $HOME/.homesick/repos/homeshick | |
| printf '\nsource "$HOME/.homesick/repos/homeshick/homeshick.sh"' >> $HOME/.bashrc | |
| source ~/.bashrc | |
| #source $HOME/.homesick/repos/homeshick/homeshick.sh | |
| ### Backup existing zshrc if it exists...just in case the server comes with something useful there ### | |
| if [ -d "$HOME/.zshrc" ]; then | |
| mv ~/.zshrc ~/.zshrc.local | |
| fi | |
| ### Grab my dotfiles from github ### | |
| homeshick --batch clone https://github.com/smcabrera/castillo-cabrera.git | |
| ### Clone public repos ### | |
| homeshick clone --batch robbyrussell/oh-my-zsh | |
| ### Link it all to $HOME ### | |
| homeshick link --force | |
| ### Set default shell to your favorite shell ### | |
| $chsh --shell /bin/zsh `whoami` | |
| echo "Log in again to start your proper shell" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment