Created
September 10, 2015 18:44
-
-
Save speters/0138046f1208b44cb5be to your computer and use it in GitHub Desktop.
git post-commit hook script to copy a subdirectory of the repo to another folder
This file contains 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 | |
# copy a subdirectory of a repository to another location after commit | |
DESTINATIONDIR=/usr/share/arduino/libraries | |
# subdirectory in repo to copy: | |
CHECKOUTSUBDIR=TMRpcm | |
mkdir /tmp/bla | |
unset GIT_INDEX_FILE | |
GIT_WORK_TREE=${DESTINATIONDIR} git checkout -f -- ${CHECKOUTSUBDIR} |
Author
speters
commented
Oct 26, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment