You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 rivejä
1.2 KiB

  1. #!/usr/bin/env zsh
  2. GIT=$(which git)
  3. os=$(uname)
  4. os=${os:l}
  5. cd ~
  6. rm -f .profile
  7. rm -f .tmux.conf
  8. rm -f .zshrc
  9. rm -f .i3/config
  10. rm -f .i3status.conf
  11. rm -f .muttrc
  12. if [ ! -d .mutt ]; then
  13. mkdir -p .mutt/cache/headers/../bodies
  14. touch .mutt/certificates
  15. touch .mutt/credentials
  16. touch .mutt/folders
  17. touch .mutt/aliases
  18. fi
  19. if [ ! -d .oh-my-zsh ]; then
  20. git clone https://github.com/lattera/oh-my-zsh.git .oh-my-zsh
  21. fi
  22. plugins=""
  23. while getopts 'p:' o; do
  24. case "${o}" in
  25. p)
  26. if [ ! -d .oh-my-zsh/plugins/${OPTARG} ]; then
  27. echo "Warning: oh-my-zsh plugin ${OPTARG} not found"
  28. fi
  29. plugins="${plugins} ${OPTARG}"
  30. ;;
  31. *)
  32. echo "USAGE: ${0} [-p plugin]"
  33. echo " -p plugin Add zsh plugin. May be specified multiple times"
  34. exit 1
  35. ;;
  36. esac
  37. done
  38. sed "s,__PLUGINS__,${plugins}," ~/dotfiles/zshrc.templ > ~/dotfiles/zshrc
  39. if [ ! -d .i3 ]; then
  40. mkdir -p .i3
  41. fi
  42. ln -s ~/dotfiles/i3status.${os}.conf .i3status.conf
  43. ln -s ~/dotfiles/i3config.${os} .i3/config
  44. ln -s ~/dotfiles/.freebsd_profile .profile
  45. ln -s ~/dotfiles/.tmux.conf .tmux.conf
  46. ln -s ~/dotfiles/zshrc .zshrc
  47. ln -s ~/dotfiles/muttrc .muttrc
  48. ln -s ~/dotfiles/.vimrc .vimrc
  49. ln -s ~/dotfiles/neomutt-gpg.rc .mutt/gpg.rc
  50. if [ ! -d tmux/logs ]; then
  51. mkdir -p tmux/logs
  52. fi