Mercurial > hg > kdocs
annotate make/make.sh @ 72:3232f421c770
Exit if any of the patches fail to apply, show name of each patch as it's
applied, and use the patched Documentation directory to build htmldocs.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 16 Oct 2007 21:44:50 -0500 |
parents | 86151d3b2003 |
children | 6adf16f10d54 |
rev | line source |
---|---|
1
34a037d461f9
Some random infrastructure to build documentation from source.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 #!/bin/bash |
34a037d461f9
Some random infrastructure to build documentation from source.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
3 [ -z "$WEBDIR" ] && WEBDIR=~/www/kdocs |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
4 [ -z "$LNXDIR" ] && LNXDIR=~/linux |
29
c91c3395876f
Produce better menuconfig output, now in multiple files and with concise
Rob Landley <rob@landley.net>
parents:
28
diff
changeset
|
5 |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
6 echo $WEBDIR |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
7 |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
8 echo "Update master index." |
29
c91c3395876f
Produce better menuconfig output, now in multiple files and with concise
Rob Landley <rob@landley.net>
parents:
28
diff
changeset
|
9 |
49
aa424ac2ce30
Generate index.html from master.idx.
Rob Landley <rob@landley.net>
parents:
47
diff
changeset
|
10 $WEBDIR/make/indexsections.py $WEBDIR/master.idx > $WEBDIR/index.html || exit 1 |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
11 |
51
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
12 echo "Mirror resources" |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
13 |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
14 cd "$WEBDIR" |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
15 make/mirror.py |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
16 cat mirror/ols2002.pdf.gz | gunzip > mirror/ols2002.pdf |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
17 if [ -z "$(find mirror/ols2001 -name "*.pdf")" ] |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
18 then |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
19 mkdir -p mirror/ols2001 && |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
20 cd mirror/ols2001 && |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
21 wget -r -l 1 -nd http://lwn.net/2001/features/OLS/pdf/pdf/ && |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
22 cd ../.. |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
23 |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
24 [ $? -ne 0 ] && exit 1 |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
25 fi |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
26 |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
27 if [ -z "$(find ols/2007 -name "*.pdf")" ] |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
28 then |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
29 echo "Split ols files" |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
30 mkdir -p ols/{1999,2000,2001,2002,2003,2004,2005,2006,2007} && |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
31 cp mirror/ols2001/*.pdf ols/2001 && |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
32 make/splitols.py mirror ols |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
33 [ $? -ne 0 ] && exit 1 |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
34 fi |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
35 |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
36 echo "Update Linux kernel from kernel.org" |
36
9a5ef2d1264e
Call indexsections.py and work around a bug in xmlto.
Rob Landley <rob@landley.net>
parents:
32
diff
changeset
|
37 |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
38 if [ ! -d "$LNXDIR" ] |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
39 then |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
40 # Clone repository if we haven't got one yet. |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
41 mkdir -p "$LNXDIR"/hg && |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
42 cd "$LNXDIR"/hg && |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
43 hg clone http://kernel.org/hg/linux-2.6 hg |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
44 else |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
45 # Update kernel mercurial repository. |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
46 cd "$LNXDIR"/hg && |
59
86151d3b2003
Teach make/make.sh --short not to pull from hg.
Rob Landley <rob@landley.net>
parents:
58
diff
changeset
|
47 if [ "$1" != "--short" ] |
86151d3b2003
Teach make/make.sh --short not to pull from hg.
Rob Landley <rob@landley.net>
parents:
58
diff
changeset
|
48 then |
86151d3b2003
Teach make/make.sh --short not to pull from hg.
Rob Landley <rob@landley.net>
parents:
58
diff
changeset
|
49 hg pull -u |
86151d3b2003
Teach make/make.sh --short not to pull from hg.
Rob Landley <rob@landley.net>
parents:
58
diff
changeset
|
50 fi |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
51 fi |
36
9a5ef2d1264e
Call indexsections.py and work around a bug in xmlto.
Rob Landley <rob@landley.net>
parents:
32
diff
changeset
|
52 |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
53 [ $? -ne 0 ] && exit 1 |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
54 |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
55 echo -n "Grab version number..." |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
56 |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
57 LNXTAG="$(hg tags | head -n 2 | tail -n 1 | awk '{print $1}')" |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
58 echo $LNXTAG |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
59 |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
60 echo Copy readme files from Linux kernel |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
61 |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
62 rm -rf $WEBDIR/readme |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
63 mkdir $WEBDIR/readme |
32
6f30fdd28dab
Add a few google videos, and the README files from the kernel source.
Rob Landley <rob@landley.net>
parents:
29
diff
changeset
|
64 for i in $(find . -name "*[Rr][Ee][Aa][Dd][Mm][Ee]*" | grep -v "Documentation/") |
6f30fdd28dab
Add a few google videos, and the README files from the kernel source.
Rob Landley <rob@landley.net>
parents:
29
diff
changeset
|
65 do |
6f30fdd28dab
Add a few google videos, and the README files from the kernel source.
Rob Landley <rob@landley.net>
parents:
29
diff
changeset
|
66 OUT=$(echo $i | sed -e 's@\./@@' -e 's@/@-@g') |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
67 cp $i $WEBDIR/readme/$OUT |
32
6f30fdd28dab
Add a few google videos, and the README files from the kernel source.
Rob Landley <rob@landley.net>
parents:
29
diff
changeset
|
68 done |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
69 make help > $WEBDIR/makehelp.txt |
32
6f30fdd28dab
Add a few google videos, and the README files from the kernel source.
Rob Landley <rob@landley.net>
parents:
29
diff
changeset
|
70 |
26
3c78854053e3
A script to convert menuconfig to html. Have make.sh call it for all $ARCH.
Rob Landley <rob@landley.net>
parents:
12
diff
changeset
|
71 echo Convert kconfig to html for all architectures |
29
c91c3395876f
Produce better menuconfig output, now in multiple files and with concise
Rob Landley <rob@landley.net>
parents:
28
diff
changeset
|
72 |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
73 echo $WEBDIR/menuconfig/ |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
74 rm -rf $WEBDIR/menuconfig/ |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
75 mkdir -p $WEBDIR/menuconfig |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
76 echo "<html><title>Menuconfig docs for Linux $LNXTAG</title><body><ul>" > $WEBDIR/menuconfig/index.html |
27
ba26365cf74f
Generate menuconfig/index.html.
Rob Landley <rob@landley.net>
parents:
26
diff
changeset
|
77 for i in $(find arch -maxdepth 2 -name Kconfig | sort) |
26
3c78854053e3
A script to convert menuconfig to html. Have make.sh call it for all $ARCH.
Rob Landley <rob@landley.net>
parents:
12
diff
changeset
|
78 do |
3c78854053e3
A script to convert menuconfig to html. Have make.sh call it for all $ARCH.
Rob Landley <rob@landley.net>
parents:
12
diff
changeset
|
79 echo Converting "$i" |
3c78854053e3
A script to convert menuconfig to html. Have make.sh call it for all $ARCH.
Rob Landley <rob@landley.net>
parents:
12
diff
changeset
|
80 ARCH=$(echo $i | sed -r 's@.*/(.*)/.*@\1@') |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
81 echo "<li><a href=${ARCH}.html>${ARCH}</a></li>" >> $WEBDIR/menuconfig/index.html |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
82 $WEBDIR/make/menuconfig2html.py $i $WEBDIR/menuconfig "$LNXTAG" > $WEBDIR/menuconfig/$ARCH.html |
26
3c78854053e3
A script to convert menuconfig to html. Have make.sh call it for all $ARCH.
Rob Landley <rob@landley.net>
parents:
12
diff
changeset
|
83 done |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
84 echo "</ul></body></html>" >> $WEBDIR/menuconfig/index.html |
26
3c78854053e3
A script to convert menuconfig to html. Have make.sh call it for all $ARCH.
Rob Landley <rob@landley.net>
parents:
12
diff
changeset
|
85 |
9
b1f967311862
Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents:
1
diff
changeset
|
86 echo Install updated Documentation |
29
c91c3395876f
Produce better menuconfig output, now in multiple files and with concise
Rob Landley <rob@landley.net>
parents:
28
diff
changeset
|
87 |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
88 rm -rf $WEBDIR/Documentation/ |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
89 cp -a $LNXDIR/hg/Documentation $WEBDIR/Documentation |
56
7fa04e9d3e4b
Automatically run docdiridx.py on Documentation, and remove a debugging exit.
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
90 cd $WEBDIR |
72
3232f421c770
Exit if any of the patches fail to apply, show name of each patch as it's
Rob Landley <rob@landley.net>
parents:
59
diff
changeset
|
91 for i in make/patches/*.patch |
3232f421c770
Exit if any of the patches fail to apply, show name of each patch as it's
Rob Landley <rob@landley.net>
parents:
59
diff
changeset
|
92 do |
3232f421c770
Exit if any of the patches fail to apply, show name of each patch as it's
Rob Landley <rob@landley.net>
parents:
59
diff
changeset
|
93 echo $i |
3232f421c770
Exit if any of the patches fail to apply, show name of each patch as it's
Rob Landley <rob@landley.net>
parents:
59
diff
changeset
|
94 patch -p1 -i $i || exit 1 |
3232f421c770
Exit if any of the patches fail to apply, show name of each patch as it's
Rob Landley <rob@landley.net>
parents:
59
diff
changeset
|
95 done |
56
7fa04e9d3e4b
Automatically run docdiridx.py on Documentation, and remove a debugging exit.
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
96 make/docdiridx.py |
1
34a037d461f9
Some random infrastructure to build documentation from source.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
97 |
58
8f5d75ee17f2
Add a --short option to make/make.sh
Rob Landley <rob@landley.net>
parents:
56
diff
changeset
|
98 [ "$1" == "--short" ] && exit 1 |
8f5d75ee17f2
Add a --short option to make/make.sh
Rob Landley <rob@landley.net>
parents:
56
diff
changeset
|
99 |
9
b1f967311862
Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents:
1
diff
changeset
|
100 echo Build htmldocs and xhtml-nochunks |
29
c91c3395876f
Produce better menuconfig output, now in multiple files and with concise
Rob Landley <rob@landley.net>
parents:
28
diff
changeset
|
101 |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
102 rm -rf $LNXDIR/temp |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
103 cd $LNXDIR/hg |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
104 mkdir $LNXDIR/temp |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
105 make allnoconfig O=$LNXDIR/temp |
10
72ac28634233
Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents:
9
diff
changeset
|
106 |
72
3232f421c770
Exit if any of the patches fail to apply, show name of each patch as it's
Rob Landley <rob@landley.net>
parents:
59
diff
changeset
|
107 # Adjust to use the patched Documentation directory |
3232f421c770
Exit if any of the patches fail to apply, show name of each patch as it's
Rob Landley <rob@landley.net>
parents:
59
diff
changeset
|
108 ln -s $WEBDIR/Documentation $LNXDIR/temp |
3232f421c770
Exit if any of the patches fail to apply, show name of each patch as it's
Rob Landley <rob@landley.net>
parents:
59
diff
changeset
|
109 |
10
72ac28634233
Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents:
9
diff
changeset
|
110 # I have a dual processor laptop, so overlap work here. Generate the xml |
72ac28634233
Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents:
9
diff
changeset
|
111 # first, then have make htmldocs produce split-up versions in the background |
72ac28634233
Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents:
9
diff
changeset
|
112 # while a script produces nochunks versions in the foreground. |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
113 cd $LNXDIR/temp |
10
72ac28634233
Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents:
9
diff
changeset
|
114 make -j 2 xmldocs |
72ac28634233
Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents:
9
diff
changeset
|
115 make -j 2 htmldocs & |
9
b1f967311862
Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents:
1
diff
changeset
|
116 cd Documentation/DocBook |
b1f967311862
Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents:
1
diff
changeset
|
117 for i in *.xml |
12
b7f376e957ac
Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents:
11
diff
changeset
|
118 do |
b7f376e957ac
Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents:
11
diff
changeset
|
119 echo "Converting $i" |
b7f376e957ac
Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents:
11
diff
changeset
|
120 xmlto xhtml-nochunks $i -o xhtml-nochunks |
9
b1f967311862
Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents:
1
diff
changeset
|
121 done |
10
72ac28634233
Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents:
9
diff
changeset
|
122 # Wait for background task to finish before retrieving result |
11 | 123 while [ $(jobs | wc -l) -ne 0 ] |
124 do | |
125 sleep 1 | |
12
b7f376e957ac
Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents:
11
diff
changeset
|
126 # Without this next line, bash never notices a change in the number of jobs. |
b7f376e957ac
Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents:
11
diff
changeset
|
127 # Bug noticed in Ubuntu 7.04 |
b7f376e957ac
Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents:
11
diff
changeset
|
128 jobs > /dev/null |
11 | 129 done |
9
b1f967311862
Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents:
1
diff
changeset
|
130 mv xhtml-nochunks/*.html . |
b1f967311862
Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents:
1
diff
changeset
|
131 rmdir xhtml-nochunks |
1
34a037d461f9
Some random infrastructure to build documentation from source.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
132 |
28
35b3feac366a
Generate a better index for htmldocs: show document titles and both versions.
Rob Landley <rob@landley.net>
parents:
27
diff
changeset
|
133 echo Install htmldocs and update index |
29
c91c3395876f
Produce better menuconfig output, now in multiple files and with concise
Rob Landley <rob@landley.net>
parents:
28
diff
changeset
|
134 |
72
3232f421c770
Exit if any of the patches fail to apply, show name of each patch as it's
Rob Landley <rob@landley.net>
parents:
59
diff
changeset
|
135 rm -f $WEBDIR/htmldocs |
3232f421c770
Exit if any of the patches fail to apply, show name of each patch as it's
Rob Landley <rob@landley.net>
parents:
59
diff
changeset
|
136 ln -s Documentation/DocBook $WEBDIR/htmldocs |
38
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
137 cd $WEBDIR/htmldocs |
36
9a5ef2d1264e
Call indexsections.py and work around a bug in xmlto.
Rob Landley <rob@landley.net>
parents:
32
diff
changeset
|
138 # Work around a bug in xmlto: it puts an incorrect code page into the converted |
9a5ef2d1264e
Call indexsections.py and work around a bug in xmlto.
Rob Landley <rob@landley.net>
parents:
32
diff
changeset
|
139 # html documents, which produces line noise in the output. |
9a5ef2d1264e
Call indexsections.py and work around a bug in xmlto.
Rob Landley <rob@landley.net>
parents:
32
diff
changeset
|
140 find . -name "*.html" | xargs sed -i -e 's/.*ISO-8859-1.*//' |
28
35b3feac366a
Generate a better index for htmldocs: show document titles and both versions.
Rob Landley <rob@landley.net>
parents:
27
diff
changeset
|
141 head -n 2 index.html > index2.html |
35b3feac366a
Generate a better index for htmldocs: show document titles and both versions.
Rob Landley <rob@landley.net>
parents:
27
diff
changeset
|
142 echo "<ul>" >> index2.html |
35b3feac366a
Generate a better index for htmldocs: show document titles and both versions.
Rob Landley <rob@landley.net>
parents:
27
diff
changeset
|
143 for i in $(ls -p | sed -n 's@/$@@p') |
35b3feac366a
Generate a better index for htmldocs: show document titles and both versions.
Rob Landley <rob@landley.net>
parents:
27
diff
changeset
|
144 do |
35b3feac366a
Generate a better index for htmldocs: show document titles and both versions.
Rob Landley <rob@landley.net>
parents:
27
diff
changeset
|
145 echo "<li>(<a href=\"$i\">chunks</a>) (<a href=\"${i}.html\">nochunks</a>) " >> index2.html |
35b3feac366a
Generate a better index for htmldocs: show document titles and both versions.
Rob Landley <rob@landley.net>
parents:
27
diff
changeset
|
146 sed -nr 's@.*<title>(.*)</title>.*@\1@p' ${i}.xml | head -n 1 >> index2.html |
35b3feac366a
Generate a better index for htmldocs: show document titles and both versions.
Rob Landley <rob@landley.net>
parents:
27
diff
changeset
|
147 echo "</li>" >> index2.html |
35b3feac366a
Generate a better index for htmldocs: show document titles and both versions.
Rob Landley <rob@landley.net>
parents:
27
diff
changeset
|
148 done |
35b3feac366a
Generate a better index for htmldocs: show document titles and both versions.
Rob Landley <rob@landley.net>
parents:
27
diff
changeset
|
149 echo "</ul>" >> index2.html |
35b3feac366a
Generate a better index for htmldocs: show document titles and both versions.
Rob Landley <rob@landley.net>
parents:
27
diff
changeset
|
150 mv index2.html index.html |
12
b7f376e957ac
Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents:
11
diff
changeset
|
151 echo "Done with kdocs" |