All of my important config files
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.

41 lines
1.3 KiB

  1. #!/usr/bin/env bash
  2. DOTFILES=$HOME/.dotfiles
  3. if [[ ! -d ~/.oh-my-zsh ]]; then
  4. echo -e "\nInstall oh-my-zsh"
  5. echo "============================="
  6. sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  7. ln -s $DOTFILES/zsh/{custom,aliases}.zsh ~/.oh-my-zsh/custom/
  8. ln -s $DOTFILES/zsh/custom-agnoster.zsh-theme ~/.oh-my-zsh/custom/themes/agnoster.zsh-theme
  9. fi
  10. echo -e "\nCreating symlinks"
  11. echo "=============================="
  12. linkables=$( find -H "$DOTFILES" -maxdepth 3 -name '*.symlink' )
  13. for file in $linkables ; do
  14. target="$HOME/.$( basename $file '.symlink' )"
  15. if [ -e $target ]; then
  16. echo "~${target#$HOME} already exists... Skipping."
  17. else
  18. echo "Creating symlink for $file"
  19. ln -s $file $target
  20. fi
  21. done
  22. # Vim folders
  23. echo -e "\eLinking vim files and folders"
  24. mkdir "$HOME/.config/nvim"
  25. ln "$DOTFILES/init.vim" "$HOME/.config/nvim"
  26. linkables=$( find vim -mindepth 1 -type d -exec basename {} \; )
  27. mkdir ~/.config/nvim
  28. for folder in $linkables ; do
  29. target="$HOME/.config/nvim/$folder"
  30. if [ -e $target ]; then
  31. echo "~${target#$HOME/.vim} already exists... Skipping."
  32. else
  33. echo "Creating symlink for $folder"
  34. ln -s $DOTFILES/vim/$folder $target
  35. fi
  36. done