dustin (owner)

Revisions

gist: 209846 Download_button fork
public
Public Clone URL: git://gist.github.com/209846.git
Embed All Files: show embed
doc-sync.sh #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
 
branch_name=gh-pages
doc_root=www
 
refname=refs/heads/$branch_name
 
doc_sha=`git ls-tree -d HEAD $doc_root | awk '{print $3}'`
 
if git rev-parse --verify -q $refname > /dev/null
then
new_commit=`echo "Auto-update docs." | git commit-tree $doc_sha -p $refname`
else
new_commit=`echo "Auto-update docs." | git commit-tree $doc_sha`
fi
 
git update-ref $refname $new_commit