Efficiency fix for ghc-get-packages script.

svn path=/nixpkgs/trunk/; revision=16326
This commit is contained in:
Andres Löh 2009-07-10 19:36:50 +00:00
parent 18ef0d1673
commit 059b912b27

View file

@ -11,11 +11,11 @@ else
fi
PATH="$2:$PATH"
IFS=":"
PKGS=""
PKGS=()
for p in $PATH; do
PkgDir="$p/../lib/ghc-pkgs/ghc-$version"
for i in $PkgDir/*.installedconf; do
test -f $i && PKGS="$PKGS $prefix$i"
test -f $i && PKGS[${#PKGS[*]}]="$prefix$i"
done
done
echo $PKGS
echo ${PKGS[*]}