dotfiles-upgrade 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. echo "Completions for bash"
  25. curl -# https://raw.githubusercontent.com/tmuxinator/tmuxinator/master/completion/tmuxinator.bash \
  26. -o ~/dotfiles/shell/bash/tmuxinator.bash
  27. echo "Completions for zsh"
  28. curl -# https://raw.githubusercontent.com/zsh-users/zsh-completions/master/src/_tmuxinator \
  29. -o ~/dotfiles/shell/zsh/completions/_tmuxinator
  30. curl -# https://raw.githubusercontent.com/zsh-users/zsh-completions/master/src/_ack \
  31. -o ~/dotfiles/shell/zsh/completions/_ack
  32. curl -# https://raw.githubusercontent.com/zsh-users/zsh-completions/master/src/_ag \
  33. -o ~/dotfiles/shell/zsh/completions/_ag
  34. echo "tmux colours - solarized 256"
  35. curl -# https://raw.githubusercontent.com/seebi/tmux-colors-solarized/master/tmuxcolors-256.conf \
  36. -o ~/dotfiles/tmux/tmuxcolors-256.conf
  37. echo "z"
  38. curl -# https://raw.githubusercontent.com/rupa/z/master/z.sh \
  39. -o ~/dotfiles/shell/common/z.sh
  40. curl -# https://raw.githubusercontent.com/rupa/z/master/z.1 \
  41. -o ~/dotfiles/shell/man/man1/z.1
  42. echo "v"
  43. curl -# https://raw.githubusercontent.com/rupa/v/master/v \
  44. -o ~/dotfiles/bin/v && chmod 0755 ~/dotfiles/bin/v
  45. curl -# https://raw.githubusercontent.com/rupa/v/master/v.1 \
  46. -o ~/dotfiles/shell/man/man1/v.1
  47. echo "coloured manpages"
  48. curl -# https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/plugins/colored-man-pages/colored-man-pages.plugin.zsh \
  49. -o ~/dotfiles/shell/common/coloured-man-pages.sh
  50. echo "vim-plug"
  51. vim +PlugUpgrade +PlugUpdate! +quitall!
  52. echo "submodules"
  53. (cd ~/dotfiles && git submodule foreach git pull origin master)