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.

39 lines
1.2 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. fi
  9. echo -e "\nCreating symlinks"
  10. echo "=============================="
  11. linkables=$( find -H "$DOTFILES" -maxdepth 3 -name '*.symlink' )
  12. for file in $linkables ; do
  13. target="$HOME/.$( basename $file '.symlink' )"
  14. if [ -e $target ]; then
  15. echo "~${target#$HOME} already exists... Skipping."
  16. else
  17. echo "Creating symlink for $file"
  18. ln -s $file $target
  19. fi
  20. done
  21. # Vim folders
  22. echo -e "\eLinking vim files and folders"
  23. ln "$DOTFILES/init.vim" "$HOME/.config/nvim"
  24. linkables=$( find vim -mindepth 1 -type d -exec basename {} \; )
  25. mkdir ~/.config/nvim
  26. for folder in $linkables ; do
  27. target="$HOME/.config/nvim/$folder"
  28. if [ -e $target ]; then
  29. echo "~${target#$HOME/.vim} already exists... Skipping."
  30. else
  31. echo "Creating symlink for $folder"
  32. ln -s $DOTFILES/vim/$folder $target
  33. fi
  34. done