dotfiles-upgrade 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. IFS=$'\n\t'
  4. # Update files that have been commited to dotfiles
  5. #
  6. # Many additions to these dotfiles are copied straight from external sources.
  7. # One might say that it would be easier to clone submodules. We do not do this:
  8. #
  9. # - That would be a lot of unnecessarily heavy submodules.
  10. # - The files are often small utilities, and do not really need frequent
  11. # updating.
  12. #
  13. # This script keeps a track of these kinds of files, and performs re-downloading
  14. # of their (hopefully) latest versions.
  15. echo "Downloading files from external sources:"
  16. # No need to update. Here for reference.
  17. #echo "ack"
  18. #curl -# http://beyondgrep.com/ack-2.14-single-file \
  19. #-o ~/dotfiles/bin/ack && chmod 0755 ~/dotfiles/bin/ack
  20. # No need to update. Here for reference.
  21. #echo "gitignore"
  22. #curl -# https://gist.githubusercontent.com/octocat/9257657/raw/3f9569e65df83a7b328b39a091f0ce9c6efc6429/.gitignore \
  23. #-o ~/dotfiles/git/globalignore
  24. # No need to update. Here for reference.
  25. #echo "tmux colours - solarized 256"
  26. #curl -# https://raw.githubusercontent.com/seebi/tmux-colors-solarized/master/tmuxcolors-256.conf \
  27. #-o ~/dotfiles/tmux/tmuxcolors-256.conf
  28. echo "Completions for bash"
  29. curl -# https://raw.githubusercontent.com/tmuxinator/tmuxinator/master/completion/tmuxinator.bash \
  30. -o ~/dotfiles/shell/bash/tmuxinator.bash
  31. echo "Completions for zsh"
  32. curl -# https://raw.githubusercontent.com/zsh-users/zsh-completions/master/src/_tmuxinator \
  33. -o ~/dotfiles/shell/zsh/completions/_tmuxinator
  34. echo "z"
  35. curl -# https://raw.githubusercontent.com/rupa/z/master/z.sh \
  36. -o ~/dotfiles/shell/common/z.sh
  37. curl -# https://raw.githubusercontent.com/rupa/z/master/z.1 \
  38. -o ~/dotfiles/docs/man/man1/z.1
  39. echo "v"
  40. curl -# https://raw.githubusercontent.com/rupa/v/master/v \
  41. -o ~/dotfiles/bin/v && chmod 0755 ~/dotfiles/bin/v
  42. curl -# https://raw.githubusercontent.com/rupa/v/master/v.1 \
  43. -o ~/dotfiles/docs/man/man1/v.1
  44. echo "coloured manpages"
  45. curl -# https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/plugins/colored-man-pages/colored-man-pages.plugin.zsh \
  46. -o ~/dotfiles/shell/common/coloured-man-pages.sh
  47. echo "rainbarf"
  48. curl -# https://raw.githubusercontent.com/creaktive/rainbarf/master/rainbarf \
  49. -o ~/dotfiles/bin/rainbarf
  50. echo "vim-airline theme"
  51. curl -# https://raw.githubusercontent.com/vim-airline/vim-airline-themes/master/autoload/airline/themes/papercolor.vim \
  52. -o ~/dotfiles/vim/autoload/airline/themes/papercolor.vim
  53. echo "vim-plug"
  54. vim +PlugUpgrade +PlugUpdate! +quitall!
  55. echo "submodules"
  56. (cd ~/dotfiles && git submodule foreach git pull origin master)