Skip to content

Instantly share code, notes, and snippets.

View AngellusMortis's full-sized avatar

Christopher Bailey AngellusMortis

  • Multi Media LLC
View GitHub Profile
@AngellusMortis
AngellusMortis / post-merge
Last active September 26, 2016 17:11 — forked from GianlucaGuarini/post-merge
Git hook that gets triggered after any 'git pull' whenever one of the files specified has changed. Useful to update any web application dependency using bower npm or composer
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# forked by Gianluca Guarini
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep -E --quiet "$1" && eval "$2"
}