| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- #!/bin/sh
- # This script pulls extra software and creates appropriate symlinks in the home
- # directory
- # Run from where it's located (within dotfiles directory)
- # A lot of this extra knowledge courtesy of vimcasts.org!
- # Make a known_hosts file if none, otherwise zsh throws an error for our .zshrc
- echo "\nChecking for known_hosts:"
- if test -f ~/.ssh/known_hosts; then
- echo " -> Found"
- else
- echo " -> Not Found"
- mkdir -p ~/.ssh
- touch ~/.ssh/known_hosts
- echo " -> Created ~/.ssh/known_hosts"
- fi
- # Ack for this user (perl 5.8.8 or higher on system)
- # Curl may need to have proxy settings
- echo "\nChecking for ack in ~/bin:"
- if test -f ~/bin/ack; then
- echo " -> Found"
- else
- echo " -> Not Found"
- mkdir -p ~/bin
- curl http://betterthangrep.com/ack-standalone > ~/bin/ack
- chmod 0755 ~/bin/ack
- echo " -> Installed ~/bin/ack from betterthangrep.com"
- fi
- # color for git! Some machines don't have it.
- echo "\nSetting up git colour and editor:"
- git config --global color.ui true
- git config --global core.editor "vim"
- echo " -> Done"
- # This repository has vim plugins as submodules, so initialise and clone them
- echo "\nGetting dotfiles submodules:"
- git submodule init
- git submodule update
- echo " -> Done"
- # Add more vim plugins from this dotfiles directory, like so:
- # git submodule add git://github.com/tpope/module.git vim/bundle/module
- #
- # Apart from updating plugins individually, you can update all submodules
- # git submodule foreach git pull origin master
- # Vim
- echo "\nSymlinking for vim:"
- if test -d ~/.oh-my-zsh; then
- echo " -> .vim folder exists"
- else
- ln -s dotfiles/vim/ ~/.vim
- fi
- ln -s dotfiles/vim/vimrc ~/.vimrc
- mkdir ~/.vimundo # persistent undo directory
- echo " -> Done"
- # Zsh
- echo "\nSymlinking for zsh:"
- if test -d ~/.oh-my-zsh; then
- echo " -> .oh-my-zsh folder exists"
- else
- ln -s dotfiles/zsh/oh-my-zsh ~/.oh-my-zsh
- fi
- ln -s dotfiles/zsh/zshrc.ohmyzsh ~/.zshrc
- ln -s dotfiles/zsh/zshenv ~/.zshenv
- ln -s dotfiles/zsh/zshdev ~/.zshdev
- ln -s ../../oh-my-zsh-customs/cinaeco.zsh-theme zsh/oh-my-zsh/custom
- echo " -> Done"
- # Pentadactyl
- echo "\nSymlinking for pentadactyl:"
- ln -s dotfiles/pentadactyl/pentadactylrc ~/.pentadactylrc
- echo " -> Done"
- # Screen
- echo "\nSymlinking for gnu screen:"
- ln -s dotfiles/screen/screenrc ~/.screenrc
- echo " -> Done"
- # Nethack
- echo "\nSymlinking for nethack:"
- ln -s dotfiles/nethack/nethackrc ~/.nethackrc
- echo " -> Done"
- echo "\nSetup complete!"
|