[PATCH] Simplify the parsing of ../packages (and fix a GNUism in BREs).

Matthias Kilian kili at outback.escape.de
Fri Apr 8 13:17:14 CEST 2011


---
 libraries/gen_contents_index |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libraries/gen_contents_index b/libraries/gen_contents_index
index fcf30e3..72be850 100644
--- a/libraries/gen_contents_index
+++ b/libraries/gen_contents_index
@@ -7,7 +7,7 @@ HADDOCK_ARGS=
 case $* in
 --inplace)
     HADDOCK=../inplace/bin/haddock
-    for LIB in `grep '^libraries/[^ ]\+ \+- \+[^ ]\+ \+[^ ]\+ \+[^ ]\+' ../packages | sed -e 's#libraries/##' -e 's/ .*//'`
+    for LIB in $(awk '$1 ~ /^libraries\/./ && $2 == "-" && NF >= 5 && $0 = substr($1, 11)' ../packages)
     do
         HADDOCK_FILE="$LIB/dist-install/doc/html/$LIB/$LIB.haddock"
         if [ -f "$HADDOCK_FILE" ]
-- 
1.7.3.5




More information about the Cvs-ghc mailing list