/usr/sbin/update-hoogle is in hoogle 4.2.23-3build2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #!/bin/sh
readlinks() {
for i in $*; do
readlink -f $i
done
}
DATABASE_DIR=/var/lib/hoogle/databases
HOOGLE=/usr/bin/hoogle
# cleanup
rm -rf $DATABASE_DIR/*
# copy (fake) files
mkdir -p $DATABASE_DIR/download/hackage-cabal
cd $DATABASE_DIR/download && touch hackage-cabal.txt hackage-hoogle.txt haskell-platform.cabal base.txt ghc.txt
cp /usr/share/hoogle/predownload/keyword.txt $DATABASE_DIR/download/
# new database
$HOOGLE data keyword
# convert
echo -n "Converting databases."
TXTFILES_SYM=`find /usr/lib/ghc-doc/hoogle/ -name "*.txt"`
TXTFILES=`readlinks $TXTFILES_SYM`
for i in $TXTFILES; do
if [ -r "$i" ]
then
echo -n "."
$HOOGLE convert $i $DATABASE_DIR/`basename $i`.hoo --addlocation >/dev/null 2>&1
fi
done
echo " done"
# combine
find $DATABASE_DIR -name \*.hoo -print0 |
xargs -0 -- hoogle combine -o $DATABASE_DIR/default.hoo
|