[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Pkg-haskell-commits] darcs: haskell-hoogle: Collect txt files from /usr/lib/ghc-doc/hoogle/ dir.



Hi

thanks for your work on hoogle. I hope you don’t mind some code
review...

Am Donnerstag, den 04.10.2012, 13:20 +0000 schrieb kiwamu@debian.or.jp:
> diff -rN -u old-haskell-hoogle//files_hoogle/update-hoogle new-haskell-hoogle//files_hoogle/update-hoogle
> --- old-haskell-hoogle//files_hoogle/update-hoogle	2012-10-04 13:20:34.692061292 +0000
> +++ new-haskell-hoogle//files_hoogle/update-hoogle	2012-10-04 13:20:34.700037141 +0000
> @@ -15,9 +15,13 @@
>  # new database
>  $HOOGLE data keyword
>  
> -echo "Collect txt files from ghc-doc and libghc-*-doc"
> -find /usr/share/doc -wholename "/usr/share/doc/ghc-doc/html/libraries/*/*.txt*" -or -wholename "/usr/share/doc/libghc-*-doc/html/*.txt" | \
> -  haddock-collect $URLPREFIX $DATABASE_DIR/
> +TXTFILES=`find /usr/lib/ghc-doc/hoogle/ -name "*.txt" 2>/dev/null`

I think you can remove the 2>/dev/null now, at least if you
put /usr/lib/ghc-doc/hoogle/  in debian/dirs. As we don’t expect any
errors, we want to see them when they become visible.

> +if [ "$TXTFILES" = "" ]; then
> +  echo "No txt files on /usr/lib/ghc-doc/hoogle/ dir..."
> +else 
> +  echo "Collect txt files from /usr/lib/ghc-doc/hoogle/ dir"
> +  cp $TXTFILES $DATABASE_DIR/
> +fi
>  
>  # convert
>  for i in $DATABASE_DIR/*.txt; do

What is the point of first copying them and then converting them? Can’t
you just pass the filename in /usr/lib/ghc-doc/hoogle/ to hoogle?


Greetings,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: