Mercurial > hg > kdocs
annotate make/make.sh @ 83:13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
advantage of letting subsets of this functionality easily be called by new
wrapper scripts (instead of turning make.sh into a nest of --options), but
doesn't leave us with 8 gazillion tiny little scripts that share no common
code. (Probably buggy, this is just the first good stopping point.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 07 Nov 2007 01:43:39 -0600 |
parents | 6adf16f10d54 |
children | ca7e38053195 |
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 |
81
6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
Rob Landley <rob@landley.net>
parents:
72
diff
changeset
|
3 # Set environment variables and call do-*.sh in sequence |
29
c91c3395876f
Produce better menuconfig output, now in multiple files and with concise
Rob Landley <rob@landley.net>
parents:
28
diff
changeset
|
4 |
81
6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
Rob Landley <rob@landley.net>
parents:
72
diff
changeset
|
5 [ -z "$WEBDIR" ] && export WEBDIR=~/www/kdocs |
6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
Rob Landley <rob@landley.net>
parents:
72
diff
changeset
|
6 [ -z "$LNXDIR" ] && export LNXDIR=~/linux |
51
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
7 |
83
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
8 source "$WEBDIR"/make/functions.sh |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
9 |
81
6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
Rob Landley <rob@landley.net>
parents:
72
diff
changeset
|
10 # Update mercurial repository |
6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
Rob Landley <rob@landley.net>
parents:
72
diff
changeset
|
11 if [ "$1" != "--nonet" ] |
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 then |
83
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
13 echo "Update Linux source from mercurial on kernel.org" |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
14 get_hg || exit 1 |
51
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
15 fi |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
49
diff
changeset
|
16 |
83
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
17 echo "Install updated (and patched) Documentation directory." |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
18 update_documentation_dir || exit 1 |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
19 |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
20 echo "Set up Linux build directory (uses patched Documentation dir)" |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
21 setuplinuxtemp || exit 1 |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
22 |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
23 if [ "$1" == "--long" ] |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
24 then |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
25 # I have a dual processor laptop, so overlap work here. Have make htmldocs |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
26 # produce split-up versions in the background (which is very slow) |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
27 # while other work is done in the foreground. |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
28 make_htmldocs > /dev/null & |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
29 |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
30 # This is also very slow. |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
31 |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
32 # Search for references to RFC documents |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
33 "$WEBDIR"/make/do-rfc.sh & |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
34 fi |
36
9a5ef2d1264e
Call indexsections.py and work around a bug in xmlto.
Rob Landley <rob@landley.net>
parents:
32
diff
changeset
|
35 |
81
6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
Rob Landley <rob@landley.net>
parents:
72
diff
changeset
|
36 echo "Update master index." |
83
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
37 update_master || exit 1 |
36
9a5ef2d1264e
Call indexsections.py and work around a bug in xmlto.
Rob Landley <rob@landley.net>
parents:
32
diff
changeset
|
38 |
81
6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
Rob Landley <rob@landley.net>
parents:
72
diff
changeset
|
39 echo "Mirror resources" |
83
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
40 mirror_files || 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
|
41 |
841aab0fd204
Add version info to menuconfig html, and genericize make with environment vars
Rob Landley <rob@landley.net>
parents:
36
diff
changeset
|
42 echo Copy readme files from Linux kernel |
83
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
43 find_readmes || exit 1 |
32
6f30fdd28dab
Add a few google videos, and the README files from the kernel source.
Rob Landley <rob@landley.net>
parents:
29
diff
changeset
|
44 |
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
|
45 echo Convert kconfig to html for all architectures |
83
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
46 htmlize_menuconfig || exit 1 |
29
c91c3395876f
Produce better menuconfig output, now in multiple files and with concise
Rob Landley <rob@landley.net>
parents:
28
diff
changeset
|
47 |
83
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
48 echo Build nochunks htmldocs. |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
49 make_htmlnochunks || exit 1 |
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
|
50 |
83
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
51 # Wait for background task(s) to finish. If there aren't any, this continues |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
52 # immediately. |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
53 "$WEBDIR"/do-wait.sh |
1
34a037d461f9
Some random infrastructure to build documentation from source.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
54 |
83
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
55 # Install the htmldocs |
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
56 install_htmldocs || exit 1 |
81
6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
Rob Landley <rob@landley.net>
parents:
72
diff
changeset
|
57 |
6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
Rob Landley <rob@landley.net>
parents:
72
diff
changeset
|
58 # Search for references to RFC documents |
83
13a980b307f8
Largeish rewrite of make.sh, breaking things out into functions. This has the
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
59 "$WEBDIR"/make/do-rfc.sh > "$WEBDIR"/rfc-linux.html || exit 1 |
81
6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
Rob Landley <rob@landley.net>
parents:
72
diff
changeset
|
60 |
12
b7f376e957ac
Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents:
11
diff
changeset
|
61 echo "Done with kdocs" |