Skip to content

Instantly share code, notes, and snippets.

@kinglozzer
Created June 30, 2014 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kinglozzer/9374054919f1dcd68685 to your computer and use it in GitHub Desktop.
Save kinglozzer/9374054919f1dcd68685 to your computer and use it in GitHub Desktop.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
}
check_run assets/ "chgrp -R www-data assets/; chown -R www-data assets/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment