diff --git a/libraries/gen_contents_index b/libraries/gen_contents_index index dde6fbe3d9b2661d8da0876b50576441481d2a38..c8d82c8da65120828f523c9501ba706e056a5e9b 100644 --- a/libraries/gen_contents_index +++ b/libraries/gen_contents_index @@ -2,32 +2,10 @@ set -e -USAGE="Usage: $0 [--inplace] [--verbose] [--help]" -INPLACE= -VERBOSE= - HADDOCK_ARGS= -while [ "$#" -ne "0" ] -do - case "$1" in - --inplace) - INPLACE=yes - ;; - --verbose) - VERBOSE=yes - ;; - --help) - echo "$USAGE" - exit 0 - ;; - esac - - shift -done - -if [ -n "$INPLACE" ] -then +case $* in +--inplace) HADDOCK=../inplace/bin/haddock for REPO in `grep '^libraries/[^ ]* *- ' ../packages | sed -e 's#libraries/##' -e 's/ .*//'` do @@ -54,7 +32,8 @@ then fi done done -else + ;; +*) HADDOCK=../../../../../bin/haddock # We don't want the GHC API to swamp the index HADDOCK_FILES=`ls -1 */*.haddock | grep -v '/ghc\.haddock' | sort` @@ -64,13 +43,11 @@ else HADDOCK_ARG="--read-interface=${NAME_VERSION},$HADDOCK_FILE" HADDOCK_ARGS="$HADDOCK_ARGS $HADDOCK_ARG" done -fi + ;; +esac # Now create the combined contents and index pages -if [ -n "$VERBOSE" ] -then - echo $HADDOCK_ARGS -fi +echo $HADDOCK_ARGS $HADDOCK --gen-index --gen-contents -o . \ -t "Haskell Hierarchical Libraries" \ -p "prologue.txt" \