#!/bin/bash set -e cd "$(dirname "$0")" COUNT=0 set_perm() { python set_role_perm.py "$1" "$2" > /dev/null 2>&1 COUNT=$((COUNT + 1)) } echo ">>> Setting core paths to any role..." # Core UI files for p in "/index.ui" "/top.ui" "/center.ui" "/bottom.ui"; do set_perm "any" "$p" done # bricks/* - all files and subdirectories while IFS= read -r file; do rel="${file#/home/hermesai/repos/sage/wwwroot}" set_perm "any" "$rel" done < <(find wwwroot/bricks -type f 2>/dev/null) # public/* - all files and subdirectories while IFS= read -r file; do rel="${file#/home/hermesai/repos/sage/wwwroot}" set_perm "any" "$rel" done < <(find wwwroot/public -type f 2>/dev/null) echo "Done. Set ${COUNT} paths to any."