summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-01-29 14:26:30 +0000
committerIan Lynagh <ian@well-typed.com>2013-01-29 16:00:12 +0000
commitba47b1db268176b8223e2a6a1bf4daa2877dd053 (patch)
tree6d427dd1a7d6faf6fefa102f4aa62d09b4027744 /distrib
parent12e3d3f4690d76b57ca70cdfdbad049fabd79bde (diff)
downloadhaskell-ba47b1db268176b8223e2a6a1bf4daa2877dd053.tar.gz
Tweak the mkDocs script
Diffstat (limited to 'distrib')
-rwxr-xr-x[-rw-r--r--]distrib/mkDocs/mkDocs27
1 files changed, 20 insertions, 7 deletions
diff --git a/distrib/mkDocs/mkDocs b/distrib/mkDocs/mkDocs
index 4d030a5005..472bbe93a9 100644..100755
--- a/distrib/mkDocs/mkDocs
+++ b/distrib/mkDocs/mkDocs
@@ -7,28 +7,41 @@ die () {
exit 1
}
-[ "$#" -eq 2 ] || die "Bad args. Usage: $0 <Linux bindist> <Windows bindist>"
+NO_CLEAN=0
+if [ "$1" = "--no-clean" ]
+then
+ NO_CLEAN=1
+ shift
+fi
+[ "$#" -eq 2 ] || die "Bad args. Usage: $0 [--no-clean] <Linux bindist> <Windows bindist>"
LINUX_BINDIST=`realpath "$1"`
WINDOWS_BINDIST=`realpath "$2"`
mkdir docs
cd docs
+INST=`pwd`/inst
tar -jxf "$LINUX_BINDIST"
mv ghc* linux
-tar -jxf "$WINDOWS_BINDIST"
-mv ghc* windows
cd linux
-./configure --prefix=`pwd`/inst
+./configure --prefix="$INST"
make install
+cd ..
+[ "$NO_CLEAN" -eq 0 ] && rm -r linux
+tar -jxf "$WINDOWS_BINDIST"
+mv ghc* windows
cd inst/share/doc/ghc/html/libraries
-mv ../../../../../../../windows/doc/html/libraries/Win32-* .
+mv ../../../../../../windows/doc/html/libraries/Win32-* .
sh gen_contents_index
cd ..
for i in haddock libraries users_guide
do
- tar -jcf ../../../../../../$i.html.tar.bz2 $i
+ tar -jcf ../../../../../$i.html.tar.bz2 $i
done
+mv index.html ../../../../..
cd ..
-mv *.pdf *.ps ../../../../..
+mv *.pdf *.ps ../../../..
+cd ../../../..
+[ "$NO_CLEAN" -eq 0 ] && rm -r inst
+[ "$NO_CLEAN" -eq 0 ] && rm -r windows