Mercurial > hg > kdocs
diff make/make.sh @ 81:6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 23 Oct 2007 18:35:49 -0500 |
parents | 3232f421c770 |
children | 13a980b307f8 |
line wrap: on
line diff
--- a/make/make.sh Tue Oct 23 04:33:46 2007 -0500 +++ b/make/make.sh Tue Oct 23 18:35:49 2007 -0500 @@ -1,87 +1,31 @@ #!/bin/bash -[ -z "$WEBDIR" ] && WEBDIR=~/www/kdocs -[ -z "$LNXDIR" ] && LNXDIR=~/linux - -echo $WEBDIR - -echo "Update master index." +# Set environment variables and call do-*.sh in sequence -$WEBDIR/make/indexsections.py $WEBDIR/master.idx > $WEBDIR/index.html || exit 1 - -echo "Mirror resources" +[ -z "$WEBDIR" ] && export WEBDIR=~/www/kdocs +[ -z "$LNXDIR" ] && export LNXDIR=~/linux -cd "$WEBDIR" -make/mirror.py -cat mirror/ols2002.pdf.gz | gunzip > mirror/ols2002.pdf -if [ -z "$(find mirror/ols2001 -name "*.pdf")" ] +# Update mercurial repository +if [ "$1" != "--nonet" ] then - mkdir -p mirror/ols2001 && - cd mirror/ols2001 && - wget -r -l 1 -nd http://lwn.net/2001/features/OLS/pdf/pdf/ && - cd ../.. - - [ $? -ne 0 ] && exit 1 -fi - -if [ -z "$(find ols/2007 -name "*.pdf")" ] -then - echo "Split ols files" - mkdir -p ols/{1999,2000,2001,2002,2003,2004,2005,2006,2007} && - cp mirror/ols2001/*.pdf ols/2001 && - make/splitols.py mirror ols - [ $? -ne 0 ] && exit 1 + "$WEBDIR"/make/do-gethg.sh || exit 1 fi -echo "Update Linux kernel from kernel.org" +echo -n "Grab version number..." +export LNXTAG="$(hg tags | head -n 2 | tail -n 1 | awk '{print $1}')" +echo $LNXTAG -if [ ! -d "$LNXDIR" ] -then - # Clone repository if we haven't got one yet. - mkdir -p "$LNXDIR"/hg && - cd "$LNXDIR"/hg && - hg clone http://kernel.org/hg/linux-2.6 hg -else - # Update kernel mercurial repository. - cd "$LNXDIR"/hg && - if [ "$1" != "--short" ] - then - hg pull -u - fi -fi +echo "Update master index." +"$WEBDIR"/make/do-master.sh || exit 1 -[ $? -ne 0 ] && exit 1 - -echo -n "Grab version number..." - -LNXTAG="$(hg tags | head -n 2 | tail -n 1 | awk '{print $1}')" -echo $LNXTAG +echo "Mirror resources" +"$WEBDIR"/make/do-mirror.sh || exit 1 echo Copy readme files from Linux kernel - -rm -rf $WEBDIR/readme -mkdir $WEBDIR/readme -for i in $(find . -name "*[Rr][Ee][Aa][Dd][Mm][Ee]*" | grep -v "Documentation/") -do - OUT=$(echo $i | sed -e 's@\./@@' -e 's@/@-@g') - cp $i $WEBDIR/readme/$OUT -done -make help > $WEBDIR/makehelp.txt +"$WEBDIR"/make/do-readme.sh || exit 1 echo Convert kconfig to html for all architectures - -echo $WEBDIR/menuconfig/ -rm -rf $WEBDIR/menuconfig/ -mkdir -p $WEBDIR/menuconfig -echo "<html><title>Menuconfig docs for Linux $LNXTAG</title><body><ul>" > $WEBDIR/menuconfig/index.html -for i in $(find arch -maxdepth 2 -name Kconfig | sort) -do - echo Converting "$i" - ARCH=$(echo $i | sed -r 's@.*/(.*)/.*@\1@') - echo "<li><a href=${ARCH}.html>${ARCH}</a></li>" >> $WEBDIR/menuconfig/index.html - $WEBDIR/make/menuconfig2html.py $i $WEBDIR/menuconfig "$LNXTAG" > $WEBDIR/menuconfig/$ARCH.html -done -echo "</ul></body></html>" >> $WEBDIR/menuconfig/index.html +"$WEBDIR"/make/do-menuconfig.sh || exit 1 echo Install updated Documentation @@ -112,7 +56,7 @@ # while a script produces nochunks versions in the foreground. cd $LNXDIR/temp make -j 2 xmldocs -make -j 2 htmldocs & +[ "$1" != "--skimp" ] && make -j 2 htmldocs & cd Documentation/DocBook for i in *.xml do @@ -120,7 +64,7 @@ xmlto xhtml-nochunks $i -o xhtml-nochunks done # Wait for background task to finish before retrieving result -while [ $(jobs | wc -l) -ne 0 ] +[ "$1" != "--skimp" ] && while [ $(jobs | wc -l) -ne 0 ] do sleep 1 # Without this next line, bash never notices a change in the number of jobs. @@ -148,4 +92,8 @@ done echo "</ul>" >> index2.html mv index2.html index.html + +# Search for references to RFC documents +"$WEBDIR"/make/findrfc.sh > "$WEBDIR"/rfc-linux.html || exit 1 + echo "Done with kdocs"