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

#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. "$SCRIPT_DIR/_settings.sh" || {
echo "no settings" && exit 1
}
APP_DIR="${SCRIPT_DIR}/.."
PLUGINS=(winter)
THEME_DIRS=(layouts pages partials)
export WEB_GID=33
perms() {
sudo chown -R $UID:$WEB_GID "$1"
sudo chmod -R g+rwx "$1"
}
perms "${APP_DIR}/storage"
perms "${APP_DIR}/bootstrap/cache"
for DIR in "${THEME_DIRS[@]}"; do
perms "${APP_DIR}/themes/$THEME/$DIR"
done
for DIR in "${PLUGINS[@]}"; do
perms "${APP_DIR}/plugins/$DIR"
done