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.

29 lines
533 B

  1. #!/bin/bash
  2. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  3. . "$SCRIPT_DIR/_settings.sh" || {
  4. echo "no settings" && exit 1
  5. }
  6. APP_DIR="${SCRIPT_DIR}/.."
  7. PLUGINS=(winter)
  8. THEME_DIRS=(layouts pages partials)
  9. export WEB_GID=33
  10. perms() {
  11. sudo chown -R $UID:$WEB_GID "$1"
  12. sudo chmod -R g+rwx "$1"
  13. }
  14. perms "${APP_DIR}/storage"
  15. perms "${APP_DIR}/bootstrap/cache"
  16. for DIR in "${THEME_DIRS[@]}"; do
  17. perms "${APP_DIR}/themes/$THEME/$DIR"
  18. done
  19. for DIR in "${PLUGINS[@]}"; do
  20. perms "${APP_DIR}/plugins/$DIR"
  21. done