[commit: ghc] ghc-7.4: Revert "Add --verbose and --help flags to gen_contents_index" (fef5dc9)

git at git.haskell.org git at git.haskell.org
Mon Jul 6 09:19:15 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.4
Link       : http://ghc.haskell.org/trac/ghc/changeset/fef5dc9ea61b5671101339e58a27b21eea6aa78d/ghc

>---------------------------------------------------------------

commit fef5dc9ea61b5671101339e58a27b21eea6aa78d
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Mon Jul 6 11:15:58 2015 +0200

    Revert "Add --verbose and --help flags to gen_contents_index"
    
    This reverts commit e1e68550026b83ba15158fa776f406844cccedd1 which was
    accidentally pushed.


>---------------------------------------------------------------

fef5dc9ea61b5671101339e58a27b21eea6aa78d
 libraries/gen_contents_index | 37 +++++++------------------------------
 1 file changed, 7 insertions(+), 30 deletions(-)

diff --git a/libraries/gen_contents_index b/libraries/gen_contents_index
index dde6fbe..c8d82c8d 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" \



More information about the ghc-commits mailing list