30 lines
		
	
	
		
			533 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			533 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/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
 |