RUNME 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/bin/sh
  2. # This script pulls extra software and creates appropriate symlinks in the home
  3. # directory
  4. # Run from where it's located (within dotfiles directory)
  5. # A lot of this extra knowledge courtesy of vimcasts.org!
  6. # Make a known_hosts file if none, otherwise zsh throws an error for our .zshrc
  7. echo "Checking for known_hosts:"
  8. if test -f ~/.ssh/known_hosts; then
  9. echo " -> Found"
  10. else
  11. echo " -> Not Found"
  12. mkdir -p ~/.ssh
  13. touch ~/.ssh/known_hosts
  14. echo " -> Created ~/.ssh/known_hosts"
  15. fi
  16. # Ack for this user (perl 5.8.8 or higher on system)
  17. # Curl may need to have proxy settings
  18. echo "Checking for ack in ~/bin:"
  19. if test -f ~/bin/ack; then
  20. echo " -> Found"
  21. else
  22. echo " -> Not Found"
  23. mkdir -p ~/bin
  24. curl http://betterthangrep.com/ack-standalone > ~/bin/ack
  25. chmod 0755 ~/bin/ack
  26. echo " -> Installed ~/bin/ack from betterthangrep.com"
  27. fi
  28. # color for git! Some machines don't have it.
  29. echo "Setting up git colour and editor:"
  30. git config --global color.ui true
  31. git config --global core.editor "vim"
  32. echo " -> Done"
  33. # This repository has vim plugins as submodules, so initialise and clone them
  34. echo "Getting dotfiles submodules:"
  35. git submodule init
  36. git submodule update
  37. echo " -> Done"
  38. # Add more vim plugins from this dotfiles directory, like so:
  39. # git submodule add git://github.com/tpope/module.git vim/bundle/module
  40. #
  41. # Apart from updating plugins individually, you can update all submodules
  42. # git submodule foreach git pull origin master
  43. # Vim
  44. echo "Symlinking for vim:"
  45. ln -s dotfiles/vim/ ~/.vim
  46. ln -s dotfiles/vim/vimrc ~/.vimrc
  47. mkdir ~/.vimundo # persistent undo directory
  48. echo " -> Done"
  49. # Zsh
  50. echo "Symlinking for zsh:"
  51. ln -s dotfiles/zsh/zshrc ~/.zshrc
  52. ln -s dotfiles/zsh/zshenv ~/.zshenv
  53. ln -s dotfiles/zsh/zshlocal ~/.zshlocal
  54. ln -s ../../oh-my-zsh-customs/cinaeco.zsh-theme zsh/oh-my-zsh/custom
  55. echo " -> Done"
  56. # Pentadactyl
  57. echo "Symlinking for pentadactyl:"
  58. ln -s dotfiles/pentadactyl/pentadactylrc ~/.pentadactylrc
  59. echo " -> Done"
  60. # Screen
  61. echo "Symlinking for gnu screen:"
  62. ln -s dotfiles/screen/screenrc ~/.screenrc
  63. echo " -> Done"