Skip to content

Instantly share code, notes, and snippets.

@dafi
Last active January 17, 2020 12:55
Show Gist options
  • Save dafi/d57d3c37059cb5db4b2fe0c009a2d723 to your computer and use it in GitHub Desktop.
Save dafi/d57d3c37059cb5db4b2fe0c009a2d723 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Restore attribute from unzipped files
# When Finder unzip files it marks them as in "quarantine"
# so we restore the correct permission
xattr -dr com.apple.quarantine $1
# remove execute attribute
# chmod -x $(git ls-files --modified)
find $1 -type f -perm 0755 -exec chmod 644 '{}' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment