My personal dotfiles
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.

install.sh 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash
  2. AGREEN="\e[92m"
  3. ARED="\e[91m"
  4. ABLUE="\e[34m"
  5. ARESET="\e[0m"
  6. clear
  7. echo ""
  8. echo -e "$AGREEN▄ ▄ ▗▄▖ ▄▄ ▄ ▗▖ ▄▄ █ ▗▄▖"
  9. echo -e "$AGREEN█ █ ▝▜▌ ▐▛▀ █ ▐▌ ▐▌ ▐▛▀ ▀ ▝▜▌"
  10. echo -e "$AGREEN▜▖█▗▛ ▟█▙ ▐▌ ▐███ ▟█▙ ▀ ▗▟██▖ ▟█▟▌ ▟█▙ ▐███ ▐███ ██ ▐▌ ▟█▙ ▗▟██▖"
  11. echo -e "$AGREEN▐▌█▐▌▐▛ ▜▌ ▐▌ ▐▌ ▐▙▄▟▌ ▐▙▄▖▘ ▐▛ ▜▌▐▛ ▜▌ ▐▌ ▐▌ █ ▐▌ ▐▙▄▟▌▐▙▄▖▘"
  12. echo -e "$AGREEN▐█▀█▌▐▌ ▐▌ ▐▌ ▐▌ ▐▛▀▀▘ ▀▀█▖ ▐▌ ▐▌▐▌ ▐▌ ▐▌ ▐▌ █ ▐▌ ▐▛▀▀▘ ▀▀█▖"
  13. echo -e "$AGREEN▐█ █▌▝█▄█▘ ▐▙▄ ▐▌ ▝█▄▄▌ ▐▄▄▟▌ ▝█▄█▌▝█▄█▘ ▐▙▄ ▐▌ ▗▄█▄▖ ▐▙▄ ▝█▄▄▌▐▄▄▟▌"
  14. echo -e "$AGREEN▝▀ ▀▘ ▝▀▘ ▀▀ ▝▘ ▝▀▀ ▀▀▀ ▝▀▝▘ ▝▀▘ ▀▀ ▝▘ ▝▀▀▀▘ ▀▀ ▝▀▀ ▀▀▀"
  15. echo -e $ARESET
  16. if [[ $1 = "-g" ]] || [[ $1 = "--git" ]]; then
  17. git clone --recursive https://github.com/WolfeCub/dotfiles.git
  18. cd dotfiles
  19. ./install.sh
  20. elif [[ $1 = "-u" ]] || [[ $1 = "--uninstall" ]]; then
  21. for ITEM in `ls -d */`;
  22. do
  23. ( stow -D $ITEM )
  24. done
  25. elif [[ $1 = "-h" ]] || [[ $1 = "--help" ]]; then
  26. echo -en "Wolfe's dotfile installer (inspired by anthonytam)\n\n"
  27. echo -en "$ABLUE""USAGE$ARESET:\n"
  28. echo -en "\t${0} [FLAGS]\n\n"
  29. echo -en "$ABLUE""FLAGS$ARESET:\n"
  30. echo -en "\t-u, --uninstall\tRemoves all dotfile symlinks\n"
  31. echo -en "\t-h, --help\tDisplay this message\n\n"
  32. echo -en "Report bugs/problems by creating an issue on github\n"
  33. echo -en "https://github.com/anthonytam/DotFiles\n"
  34. else
  35. git submodule init 1> /dev/null
  36. git submodule update 1> /dev/null
  37. for ITEM in `ls -d */`;
  38. do
  39. TEMP=`echo $ITEM | sed s'/.$//'`
  40. echo -en "Setup config for $ARED$TEMP$ARESET? (y/n) "
  41. read USRINPUT
  42. case "$USRINPUT" in
  43. y)
  44. ( stow $ITEM )
  45. ;;
  46. *)
  47. printf "Skipping $TEMP\n"
  48. ;;
  49. esac
  50. done
  51. fi