2009-04-25 16:23:00 +02:00
|
|
|
#! /bin/sh
|
|
|
|
# Usage:
|
|
|
|
# $1: version of GHC
|
|
|
|
# $2: invocation path of GHC
|
|
|
|
# $3: prefix
|
|
|
|
version="$1"
|
|
|
|
if test -z "$3"; then
|
|
|
|
prefix="-package-conf "
|
|
|
|
else
|
|
|
|
prefix="$3"
|
|
|
|
fi
|
|
|
|
PATH="$2:$PATH"
|
|
|
|
IFS=":"
|
|
|
|
for p in $PATH; do
|
|
|
|
PkgDir="$p/../lib/ghc-pkgs/ghc-$version"
|
|
|
|
for i in $PkgDir/*.installedconf; do
|
2009-07-16 17:18:21 +02:00
|
|
|
# output takes place here
|
|
|
|
test -f $i && echo -n " $prefix$i"
|
2009-04-25 16:23:00 +02:00
|
|
|
done
|
|
|
|
done
|
2010-01-06 13:55:25 +01:00
|
|
|
test -f "$2/../lib/ghc-$version/package.conf" && echo -n " $prefix$2/../lib/ghc-$version/package.conf"
|