]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/install-doc-quick.sh
Update Swedish translation (724t0f0u).
[thirdparty/git.git] / Documentation / install-doc-quick.sh
CommitLineData
6538d1ef 1#!/bin/sh
fcbebfdd 2# This requires git-manpages and/or git-htmldocs repositories
6538d1ef 3
fcbebfdd
JH
4repository=${1?repository}
5destdir=${2?destination}
6
7head=master GIT_DIR=
8for d in "$repository/.git" "$repository"
9do
10 if GIT_DIR="$d" git rev-parse refs/heads/master >/dev/null 2>&1
11 then
12 GIT_DIR="$d"
13 export GIT_DIR
14 break
15 fi
16done
17
18if test -z "$GIT_DIR"
19then
20 echo >&2 "Neither $repository nor $repository/.git is a repository"
21 exit 1
6538d1ef
EW
22fi
23
fcbebfdd
JH
24GIT_WORK_TREE=$(pwd)
25GIT_INDEX_FILE=$(pwd)/.quick-doc.$$
26export GIT_INDEX_FILE GIT_WORK_TREE
6538d1ef 27rm -f "$GIT_INDEX_FILE"
00d8c518
JH
28trap 'rm -f "$GIT_INDEX_FILE"' 0
29
5be60078 30git read-tree $head
fcbebfdd 31git checkout-index -a -f --prefix="$destdir"/
6538d1ef 32
fcbebfdd
JH
33if test -n "$GZ"
34then
87027ae4 35 git ls-tree -r --name-only $head |
fcbebfdd 36 xargs printf "$destdir/%s\n" |
87027ae4 37 xargs gzip -f
6538d1ef
EW
38fi
39rm -f "$GIT_INDEX_FILE"