Skip to content

Instantly share code, notes, and snippets.

@jalev
Created April 18, 2014 15:30
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 jalev/11050070 to your computer and use it in GitHub Desktop.
Save jalev/11050070 to your computer and use it in GitHub Desktop.
A script that will take a webcam picture. The intent is that you put this in a post-commit script and get a buncha pictures of your ugly mug
#!/bin/bash
IMAGEDIR="/git_commit"
REPONAME=$(basename `git rev-parse --show-toplevel`)
IMAGENAME="screenshot_$(date +"%d-%m-%y_%H-%M-%S").jpeg"
IMAGESTORE="$HOME/$IMAGEDIR/$REPONAME"
if [[ ! -e $IMAGESTORE && ! -d $IMAGESTORE ]]
then
mkdir "$IMAGESTORE"
fi
streamer -f jpeg -s 800x600 -o $IMAGESTORE/$IMAGENAME
@jalev
Copy link
Author

jalev commented Apr 18, 2014

Make sure you have Streamer installer or this wont work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment