Skip to content

Commit

Permalink
Set exec bit for files that have the exec bit in Git
Browse files Browse the repository at this point in the history
  • Loading branch information
spaze committed Nov 27, 2024
1 parent 17305f6 commit 41f77bf
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/bin/set-file-mode-bits.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh

SITEDIR="$(dirname "$0")/.."
chmod --verbose a+w "$SITEDIR/../uploads/" "$SITEDIR/log/" "$SITEDIR/temp/" "$SITEDIR/public/www.michalspacek.cz/i/build/"
# Writable dirs
ROOT_DIR="$(realpath "$(dirname "$0")/../..")"
chmod --verbose a+w "$ROOT_DIR/uploads/" "$ROOT_DIR/app/log/" "$ROOT_DIR/app/temp/" "$ROOT_DIR/app/public/www.michalspacek.cz/i/build/"

# Executable files
FILES=$(git ls-files --stage | grep "^100755" | grep --only-matching --perl-regexp "(?<=\t).*$")
for FILE in $FILES; do
chmod a+x "$FILE"
done

0 comments on commit 41f77bf

Please sign in to comment.