Skip to content

Commit 41f77bf

Browse files
committed
Set exec bit for files that have the exec bit in Git
1 parent 17305f6 commit 41f77bf

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

app/bin/set-file-mode-bits.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#!/bin/sh
22

3-
SITEDIR="$(dirname "$0")/.."
4-
chmod --verbose a+w "$SITEDIR/../uploads/" "$SITEDIR/log/" "$SITEDIR/temp/" "$SITEDIR/public/www.michalspacek.cz/i/build/"
3+
# Writable dirs
4+
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

Comments
 (0)