RUNME 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 "\nChecking 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 "\nChecking 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 "\nSetting 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 "\nGetting 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 "\nSymlinking for vim:"
  45. if test -d ~/.oh-my-zsh; then
  46. echo " -> .vim folder exists"
  47. else
  48. ln -s dotfiles/vim/ ~/.vim
  49. fi
  50. ln -s dotfiles/vim/vimrc ~/.vimrc
  51. mkdir ~/.vimundo # persistent undo directory
  52. echo " -> Done"
  53. # Zsh
  54. echo "\nSymlinking for zsh:"
  55. if test -d ~/.oh-my-zsh; then
  56. echo " -> .oh-my-zsh folder exists"
  57. else
  58. ln -s dotfiles/zsh/oh-my-zsh ~/.oh-my-zsh
  59. fi
  60. ln -s dotfiles/zsh/zshrc.ohmyzsh ~/.zshrc
  61. ln -s dotfiles/zsh/zshenv ~/.zshenv
  62. ln -s dotfiles/zsh/zshdev ~/.zshdev
  63. ln -s ../../oh-my-zsh-customs/cinaeco.zsh-theme zsh/oh-my-zsh/custom
  64. echo " -> Done"
  65. # Pentadactyl
  66. echo "\nSymlinking for pentadactyl:"
  67. ln -s dotfiles/pentadactyl/pentadactylrc ~/.pentadactylrc
  68. echo " -> Done"
  69. # Screen
  70. echo "\nSymlinking for gnu screen:"
  71. ln -s dotfiles/screen/screenrc ~/.screenrc
  72. echo " -> Done"
  73. # Nethack
  74. echo "\nSymlinking for nethack:"
  75. ln -s dotfiles/nethack/nethackrc ~/.nethackrc
  76. echo " -> Done"
  77. echo "\nSetup complete!"