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.

40 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. ln "$DOTFILES/init.vim" "$HOME/.config/nvim"
  25. linkables=$( find vim -mindepth 1 -type d -exec basename {} \; )
  26. mkdir ~/.config/nvim
  27. for folder in $linkables ; do
  28. target="$HOME/.config/nvim/$folder"
  29. if [ -e $target ]; then
  30. echo "~${target#$HOME/.vim} already exists... Skipping."
  31. else
  32. echo "Creating symlink for $folder"
  33. ln -s $DOTFILES/vim/$folder $target
  34. fi
  35. done