We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17305f6 commit 41f77bfCopy full SHA for 41f77bf
app/bin/set-file-mode-bits.sh
@@ -1,4 +1,11 @@
1
#!/bin/sh
2
3
-SITEDIR="$(dirname "$0")/.."
4
-chmod --verbose a+w "$SITEDIR/../uploads/" "$SITEDIR/log/" "$SITEDIR/temp/" "$SITEDIR/public/www.michalspacek.cz/i/build/"
+# Writable dirs
+ROOT_DIR="$(realpath "$(dirname "$0")/../..")"
5
+chmod --verbose a+w "$ROOT_DIR/uploads/" "$ROOT_DIR/app/log/" "$ROOT_DIR/app/temp/" "$ROOT_DIR/app/public/www.michalspacek.cz/i/build/"
6
+
7
+# Executable files
8
+FILES=$(git ls-files --stage | grep "^100755" | grep --only-matching --perl-regexp "(?<=\t).*$")
9
+for FILE in $FILES; do
10
+ chmod a+x "$FILE"
11
+done
0 commit comments