Skip to content

Commit e6fc234

Browse files
author
Junio C Hamano
committed
Link howto documents from the main git.txt documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 628894b commit e6fc234

File tree

4 files changed

+71
-1
lines changed

4 files changed

+71
-1
lines changed

Documentation/Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ git-diff-%.txt: diff-format.txt diff-options.txt
4444
touch $@
4545

4646
clean:
47-
rm -f *.xml *.html *.1 *.7
47+
rm -f *.xml *.html *.1 *.7 howto-index.txt
4848

4949
%.html : %.txt
5050
asciidoc -b xhtml11 -d manpage $<
@@ -62,3 +62,16 @@ glossary.html : glossary.txt sort_glossary.pl
6262

6363
tutorial.html : tutorial.txt
6464
asciidoc -b xhtml11 tutorial.txt
65+
66+
howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
67+
rm -f $@+ $@
68+
sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
69+
mv $@+ $@
70+
71+
howto-index.html: howto-index.txt
72+
asciidoc -b xhtml11 howto-index.txt
73+
74+
WEBDOC_DEST = /pub/software/scm/git/docs
75+
76+
install-webdoc : html
77+
sh ./install-webdoc.sh $(WEBDOC_DEST)

Documentation/git.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ clarification info - read that first. And of the commands, I suggest
2424
reading link:git-update-cache.html[git-update-cache] and
2525
link:git-read-tree.html[git-read-tree] first - I wish I had!
2626

27+
After you get the general feel from the tutorial and this
28+
overview page, you may want to take a look at the
29+
link:howto-index.html[howto] documents.
30+
31+
2732
David Greaves <david@dgreaves.com>
2833
08/05/05
2934

Documentation/howto-index.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
cat <<\EOF
4+
GIT Howto Index
5+
===============
6+
7+
Here is a collection of mailing list postings made by various
8+
people describing how they use git in their workflow.
9+
10+
EOF
11+
12+
for txt
13+
do
14+
title=`expr "$txt" : '.*/\(.*\)\.txt$'`
15+
from=`sed -ne '
16+
/^$/q
17+
/^From:[ ]/{
18+
s///
19+
s/^[ ]*//
20+
s/[ ]*$//
21+
s/^/by /
22+
p
23+
}' "$txt"`
24+
echo "
25+
* link:$txt[$title] $from"
26+
27+
done

Documentation/install-webdoc.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh
2+
3+
T="$1"
4+
5+
for h in *.html howto/*.txt
6+
do
7+
diff -u "$T/$h" "$h" || {
8+
echo >&2 "# install $h $T/$h"
9+
rm -f "$T/$h"
10+
mkdir -p `dirname "$T/$h"`
11+
cp "$h" "$T/$h"
12+
}
13+
done
14+
strip_leading=`echo "$T/" | sed -e 's|.|.|g'`
15+
for th in "$T"/*.html "$T"/howto/*.txt
16+
do
17+
h=`expr "$th" : "$strip_leading"'\(.*\)'`
18+
case "$h" in
19+
index.html) continue ;;
20+
esac
21+
test -f "$h" && continue
22+
echo >&2 "# rm -f $th"
23+
rm -f "$th"
24+
done
25+
ln -sf git.html "$T/index.html"

0 commit comments

Comments
 (0)