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.

37 lines
1.1 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/{custom,aliases}.zsh
  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 folders"
  23. linkables=$( find vim -mindepth 1 -type d -exec basename {} \; )
  24. for folder in $linkables ; do
  25. target="$HOME/.vim/$folder"
  26. if [ -e $target ]; then
  27. echo "~${target#$HOME/.vim} already exists... Skipping."
  28. else
  29. echo "Creating symlink for $folder"
  30. ln -s $DOTFILES/vim/$folder $target
  31. fi
  32. done