install.sh 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. # by DSR! from https://github.com/xchwarze/wifi-pineapple-community
  3. THEME="$1"
  4. FS_FOLDER="$2"
  5. declare -a TYPES=("default" "yinyang" "darkmode")
  6. if [[ "$FS_FOLDER" != "" && ! -d "$FS_FOLDER" ]] || [[ "$THEME" == "" ]] || ! grep -q "$THEME" <<< "${TYPES[*]}"; then
  7. echo "Run with \"install.sh [THEME] [FS_FOLDER]\""
  8. echo " THEME -> must be one of these values: default, yinyang, darkmode"
  9. echo " FS_FOLDER -> folder containing the fs to use"
  10. exit 1
  11. fi
  12. echo "菠萝主题转换器"
  13. echo "by DSR!"
  14. echo ""
  15. echo "[*] Theme: $THEME"
  16. if [[ ! -d "$FS_FOLDER/pineapple" ]]
  17. then
  18. echo "Not found: /pineapple"
  19. exit 1
  20. fi
  21. baseurl="https://raw.githubusercontent.com/xchwarze/wifi-pineapple-community/master/themes/$THEME"
  22. wget "$baseurl/bootstrap.min.css" -O "$FS_FOLDER/pineapple/css/bootstrap.min.css"
  23. wget "$baseurl/main.css" -O "$FS_FOLDER/pineapple/css/main.css"
  24. wget "$baseurl/logo.png" -O "$FS_FOLDER/pineapple/img/logo.png"
  25. wget "$baseurl/throbber.gif" -O "$FS_FOLDER/pineapple/img/throbber.gif"
  26. echo ""
  27. echo "Done!"