changeset 73:7dae85574e82

Teach mkxmlman to use $WEBDIR instead of hardwired paths.
author Rob Landley <rob@landley.net>
date Tue, 16 Oct 2007 21:47:47 -0500
parents 3232f421c770
children 5b3c02758561
files make/mkxmlman.sh
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/make/mkxmlman.sh	Tue Oct 16 21:44:50 2007 -0500
+++ b/make/mkxmlman.sh	Tue Oct 16 21:47:47 2007 -0500
@@ -1,10 +1,14 @@
 #!/bin/bash
 
+MPTAR=man-pages-2.66.tar.gz
+WEBDIR=~/www/kdocs
+
 # Download the man-pages and doclifter source code.
 
-mkdir -p source
-[ -f source/man-pages-* ] ||
-(cd source && wget http://kernel.org/pub/linux/docs/manpages/man-pages-2.65.tar.gz)
+mkdir -p $WEBDIR/temp/source
+cd $WEBDIR/temp
+[ -f source/$MPTAR ] ||
+( cd source && wget http://kernel.org/pub/linux/docs/manpages/$MPTAR )
 [ -f source/doclifter-* ] ||
   (cd source &&
    wget http://thyrsus.com/hg/doclifter/archive/tip.tar.gz &&
@@ -25,16 +29,16 @@
 rm -rf doclifter-* &&
 tar xvzf source/doclifter-*.tar.gz &&
 cd doclifter-* &&
-./manlifter -I `pwd`/../mantemp `cd ..;ls mantemp | sed -re 's/man([0-9]p?)/-s \1/g'` -h &&
+./manlifter -I ../mantemp `cd ../mantemp;ls . | sed -re 's/man([0-9]p?)/-s \1/g'` -h &&
 
 # Fix up symlinks
-../fixlinks.py `find xmlman -type l` &&
+$WEBDIR/make/fixlinks.py `find xmlman -type l` &&
 # Remove inappropriate code page that displays garbage (workaround xmlto bug)
 find xmlman -name "*.html" | xargs sed -i -e 's/.*ISO-8859-1.*//' &&
 
 # Install result
-rm -rf ~/www/kdocs/xmlman &&
-mv xmlman ~/www/kdocs &&
+rm -rf $WEBDIR/xmlman &&
+mv xmlman $WEBDIR &&
 exit 0
 
 echo "It died."