Skip to content

@RandalSchwartz /pre-receive.sh
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
My pre-receive hook to update my website when I "git push origin master:live"
#!/bin/sh
while read old new branch
do
case "$new-$branch" in
000000000000000000*)
: echo "ignore deleted"
;;
*-refs/heads/live )
echo "UPDATING LIVE SITE";
git archive $new | (
mkdir /tmp/XX.$$
cd /tmp/XX.$$ || exit 1
umask 022
tar xf -
rsync --delete -rlpgocv lib/ /web/geekcruises-secure/lib-ng/
cd /tmp || exit 1
rm -rf XX.$$
)
;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.