| 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
- if test -f ~/.ssh/known_hosts; then
- echo "known_hosts found..."
- else
- mkdir -p ~/.ssh
- touch ~/.ssh/known_hosts
- echo "known_hosts created (blank)..."
- fi
- # Ack for this user (perl 5.8.8 or higher on system)
- # Curl may need to have proxy settings
- if test -f ~/bin/ack; then
- echo "ack found..."
- else
- mkdir -p ~/bin
- curl http://betterthangrep.com/ack-standalone > ~/bin/ack
- chmod 0755 ~/bin/ack
- echo "ack installed from betterthangrep.com..."
- fi
- # color for git! Some machines don't have it.
- git config --global color.ui true
- git config --global core.editor "vim"
- echo "git colour and editor setup..."
- # This repository has vim plugins as submodules, so initialise and clone them
- git submodule init
- git submodule update
- echo "dotfiles submodules 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
- #
- # Thanks to: https://github.com/dangerous/dotfiles
- # for cleaner way of handling symlinking
- #
- BACKUP_DIR="/tmp/$(date)"
- mkdir "$BACKUP_DIR"
- # Zsh
- mv ~/.zshrc "$BACKUP_DIR"
- mv ~/.zshenv "$BACKUP_DIR"
- ln -s dotfiles/zsh/zshrc ~/.zshrc
- ln -s dotfiles/zsh/zshenv ~/.zshenv
- # Vim
- mv ~/.vim "$BACKUP_DIR"
- mv ~/.vimrc "$BACKUP_DIR"
- ln -s dotfiles/vim ~/.vim
- ln -s dotfiles/vim/vimrc ~/.vimrc
- mkdir -p ~/.vimundo # persistent undo directory
- # Pentadactyl
- mv ~/.pentadactylrc "$BACKUP_DIR"
- ln -s dotfiles/pentadactyl/pentadactylrc ~/.pentadactylrc
- # Screen
- mv ~/.screenrc "$BACKUP_DIR"
- ln -s dotfiles/screen/screenrc ~/.screenrc
- # Tmux
- mv ~/.tmux.conf "$BACKUP_DIR"
- ln -s dotfiles/tmux/tmux.conf ~/.tmux.conf
- # Nethack
- mv ~/.nethackrc "$BACKUP_DIR"
- ln -s dotfiles/nethack/nethackrc ~/.nethackrc
- # Irssi
- mv ~/.irssi "$BACKUP_DIR"
- ln -s dotfiles/irssi ~/.irssi
- # Mongo
- mv ~/.mongorc.js "$BACKUP_DIR"
- ln -s dotfiles/mongo/mongorc.js ~/.mongorc.js
- echo "Setup complete!"
|