- Download gitcam.sh
- Download CommandCam : http://batchloaf.wordpress.com/commandcam/
- Download BMP2JPG : http://www.microtom.net/os-management/convert-bmp-to-jpg-command-line-utility
- Install this as a post-commit hook in your repo
git config --global init.templatedir '~/.git_template'
mkdir -p ~/.git_template/hooks
echo -e '#!/bin/sh\n/PATH/TO/gitcam.sh' >> ~/.git_template/hooks/post-commit
chmod +x ~/.git_template/hooks/post-commit
- Run
git init
in a repo where you want to use the hook!
Created
September 25, 2014 19:42
-
-
Save lmeyer/d51fe9b8e0b394916701 to your computer and use it in GitHub Desktop.
Gitshots for Windows - Gitcam
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### gitcam for windows (start) ### | |
NAME=`date +%Y%m%d%H%M%S` | |
DIRECTORY="/IMAGES/TARGET/DIRECTORY" | |
COMMANDCAMDIR="/PATH/TO/COMMANDCAM" | |
BMP2JPGDIR="/PATH/TO/BMP2PG" | |
if [ ! -d "$DIRECTORY" ]; then | |
mkdir $DIRECTORY | |
fi | |
$COMMANDCAMDIR/CommandCam //quiet //filename $DIRECTORY/$NAME.bmp | |
$BMP2JPGDIR/BMP2JPG.exe "$DIRECTORY/$NAME.bmp" "$DIRECTORY/$NAME.jpg" > /dev/null | |
rm $DIRECTORY/$NAME.bmp | |
### gitcam for windows (end) ### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment