2 # You may install this post-receive hook in your remote git repository
3 # to have automatic file upload when pushing to the repository.
4 while read OLD_COMMIT NEW_COMMIT REFNAME
; do
5 BRANCH
=${REFNAME#refs/heads/}
7 if [[ `grep "^\[$BRANCH\]$" ftpdata` ]]; then
8 echo "Uploading $BRANCH..."
9 $
(dirname $
(readlink
-f "$0"))/git-ftp.py
-b "$BRANCH" -c "$NEW_COMMIT" ||
exit $?