cvsserver: Add test cases for git-cvsserver
[git/git-p4.git] / Documentation / install-doc-quick.sh
bloba64054948aec41e820b8864a71229bbd568aa99a
1 #!/bin/sh
2 # This requires a branch named in $head
3 # (usually 'man' or 'html', provided by the git.git repository)
4 set -e
5 head="$1"
6 mandir="$2"
7 SUBDIRECTORY_OK=t
8 USAGE='<refname> <target directory>'
9 . git-sh-setup
10 export GIT_DIR
12 test -z "$mandir" && usage
13 if ! git-rev-parse --verify "$head^0" >/dev/null; then
14 echo >&2 "head: $head does not exist in the current repository"
15 usage
18 GIT_INDEX_FILE=`pwd`/.quick-doc.index
19 export GIT_INDEX_FILE
20 rm -f "$GIT_INDEX_FILE"
21 git-read-tree $head
22 git-checkout-index -a -f --prefix="$mandir"/
24 if test -n "$GZ"; then
25 cd "$mandir"
26 for i in `git-ls-tree -r --name-only $head`
28 gzip < $i > $i.gz && rm $i
29 done
31 rm -f "$GIT_INDEX_FILE"