install 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/usr/bin/env bash
  2. # vim: set sw=2 ts=2 sts=2 et tw=80 fmr={{{,}}} fdl=0 fdm=marker:
  3. set -euo pipefail
  4. IFS=$'\n\t'
  5. # dotfiles installer for when `make` is not available.
  6. # Initialise submodules
  7. (cd ~/dotfiles && git submodule sync && git submodule update --init)
  8. # XDG folder
  9. mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
  10. # Git config
  11. git config --global color.ui true
  12. git config --global core.editor vim
  13. git config --global core.excludesfile ~/dotfiles/git/globalignore
  14. git config --global diff.mnemonicPrefix true
  15. echo "Git config done."
  16. # Bash
  17. ~/dotfiles/bin/linkup ~/dotfiles/shell/bash_profile ~/.bash_profile
  18. ~/dotfiles/bin/linkup ~/dotfiles/shell/bashrc ~/.bashrc
  19. # Zsh
  20. ~/dotfiles/bin/linkup ~/dotfiles/shell/env ~/.zshenv
  21. ~/dotfiles/bin/linkup ~/dotfiles/shell/zshrc ~/.zshrc
  22. # Tmux
  23. ~/dotfiles/bin/linkup ~/dotfiles/tmux/tmux.conf ~/.tmux.conf
  24. # Ack
  25. ~/dotfiles/bin/linkup ~/dotfiles/ack/ackrc ~/.ackrc
  26. # Vimperator
  27. ~/dotfiles/bin/linkup ~/dotfiles/vimperator ~/.vimperator
  28. ~/dotfiles/bin/linkup ~/dotfiles/vimperator/vimperatorrc ~/.vimperatorrc
  29. # Tridactyl
  30. ~/dotfiles/bin/linkup ~/dotfiles/tridactyl/tridactylrc ~/.tridactylrc
  31. # Vim
  32. ~/dotfiles/bin/linkup ~/dotfiles/vim ~/.vim
  33. ~/dotfiles/bin/linkup ~/dotfiles/vim/vimrc ~/.vimrc
  34. ~/dotfiles/bin/linkup ~/dotfiles/vim $XDG_CONFIG_HOME/nvim
  35. # Use barebones config to avoid vimrc errors on fresh dotfiles installs.
  36. vim -N -u ~/dotfiles/vim/plugins.vim +PlugClean! +PlugUpdate! +quitall!
  37. echo "Install complete!"