replacing stale script
authorThomas Walker Lynch <eknp9n@thomas-walker-lynch.com>
Fri, 7 Nov 2025 12:22:26 +0000 (12:22 +0000)
committerThomas Walker Lynch <eknp9n@thomas-walker-lynch.com>
Fri, 7 Nov 2025 12:22:26 +0000 (12:22 +0000)
permission.sh

index d8b2bd5..5844c20 100755 (executable)
@@ -6,21 +6,16 @@
 
 set -euo pipefail
 
-BASE=${1:-incommon}
-
-if [ ! -d "$BASE" ]; then
-  echo "Error: $BASE is not a directory" >&2
-  exit 1
-fi
+base='.'
 
 # 1. Let group members enter the top-level incommon directory
-chmod g+rx "$BASE"
+chmod g+rx "$base"
 
 # 2. Fix permissions on executable/ and library/ subtrees
 for sub in executable library; do
-  if [ -d "$BASE/$sub" ]; then
-    chmod -R g+rX,g-w "$BASE/$sub"
+  if [ -d "$base/$sub" ]; then
+    chmod -R g+rX,g-w "$base/$sub"
   else
-    echo "Note: $BASE/$sub does not exist, skipping" >&2
+    echo "Note: $base/$sub does not exist, skipping" >&2
   fi
 done