Skip to content

Instantly share code, notes, and snippets.

@Sitebase
Created June 21, 2013 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sitebase/5829876 to your computer and use it in GitHub Desktop.
Save Sitebase/5829876 to your computer and use it in GitHub Desktop.
Pre-commit hook for Git to take a webcam shot every time you commit something.
HOOKSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
TIMESTAMP=$(date +"%Y%m%d%H%M")
COMMITID=$(git rev-parse HEAD)
PROJECT=$($test | awk -F/ '{print $(NF-1)}') # this doesn't work yet
imagesnap -q -w 1 ~/.gitshots/$TIMESTAMP-$COMMITID.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment