mirror of
https://github.com/tweag/ormolu.git
synced 2024-08-17 00:40:27 +03:00
24 lines
431 B
Bash
Executable File
24 lines
431 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
WDIR=$(mktemp -d)
|
|
HOOGLE_DATABASE="$WDIR/hoogle-database/"
|
|
OUTPUT="$WDIR/hackage-info.bin"
|
|
|
|
trap cleanup 0 1 2 3 15
|
|
|
|
cleanup()
|
|
{
|
|
rm -rf "$WDIR"; exit
|
|
}
|
|
|
|
mkdir "$HOOGLE_DATABASE"
|
|
curl "https://hackage.haskell.org/packages/hoogle.tar.gz" | tar -xz -C "$HOOGLE_DATABASE"
|
|
|
|
nix run .#extract-hackage-info -- "$HOOGLE_DATABASE" -o "$OUTPUT"
|
|
|
|
cp "$OUTPUT" "extract-hackage-info/hackage-info.bin"
|
|
|
|
cleanup
|