Skip to content
Snippets Groups Projects
Commit 91922b53 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Tweak the mkDocs script

parent 4e29038c
No related merge requests found
...@@ -7,28 +7,41 @@ die () { ...@@ -7,28 +7,41 @@ die () {
exit 1 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"` LINUX_BINDIST=`realpath "$1"`
WINDOWS_BINDIST=`realpath "$2"` WINDOWS_BINDIST=`realpath "$2"`
mkdir docs mkdir docs
cd docs cd docs
INST=`pwd`/inst
tar -jxf "$LINUX_BINDIST" tar -jxf "$LINUX_BINDIST"
mv ghc* linux mv ghc* linux
tar -jxf "$WINDOWS_BINDIST"
mv ghc* windows
cd linux cd linux
./configure --prefix=`pwd`/inst ./configure --prefix="$INST"
make install make install
cd ..
[ "$NO_CLEAN" -eq 0 ] && rm -r linux
tar -jxf "$WINDOWS_BINDIST"
mv ghc* windows
cd inst/share/doc/ghc/html/libraries cd inst/share/doc/ghc/html/libraries
mv ../../../../../../../windows/doc/html/libraries/Win32-* . mv ../../../../../../windows/doc/html/libraries/Win32-* .
sh gen_contents_index sh gen_contents_index
cd .. cd ..
for i in haddock libraries users_guide for i in haddock libraries users_guide
do do
tar -jcf ../../../../../../$i.html.tar.bz2 $i tar -jcf ../../../../../$i.html.tar.bz2 $i
done done
mv index.html ../../../../..
cd .. cd ..
mv *.pdf *.ps ../../../../.. mv *.pdf *.ps ../../../..
cd ../../../..
[ "$NO_CLEAN" -eq 0 ] && rm -r inst
[ "$NO_CLEAN" -eq 0 ] && rm -r windows
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment