Skip to content

Commit

Permalink
debops-optimize: Ensure normal files are not executable
Browse files Browse the repository at this point in the history
  • Loading branch information
ypid committed Sep 26, 2016
1 parent 63578ce commit e1adaf2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/debops-optimize
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ git ls-files -z | xargs --null -I '{}' find '{}' -type f -print0 | \
## Use NARROW NO-BREAK SPACE: https://en.wikipedia.org/wiki/Thin_space
## If you can’t handle Unicode, that’s your problem. Deal with it!

# Ensure normal files are not executable.
# Example: https://github.com/debops/ansible-apt_install/commit/2df7d51c58a78bd4ca7724a5f8f95208b0043c1c
git ls-files -z | xargs --null -I '{}' find '{}' -type f -executable -regextype posix-extended -regex '((:?defaults|tasks|meta|templates|handlers).*|.*\.(:?rst|md|txt))' -exec chmod -x {} \;

## Revert a change for the role itself because a self reference (currently points to GitHub) might be confusing.
git ls-files -z | xargs --null -I '{}' find '{}' -type f -regextype posix-extended -regex '(:?defaults/.*\.yml|.*\.rst)$' -print0 | \
Expand Down

0 comments on commit e1adaf2

Please sign in to comment.