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 fi
PATH="$2:$PATH" PATH="$2:$PATH"
IFS=":" IFS=":"
PKGS="" PKGS=()
for p in $PATH; do for p in $PATH; do
PkgDir="$p/../lib/ghc-pkgs/ghc-$version" PkgDir="$p/../lib/ghc-pkgs/ghc-$version"
for i in $PkgDir/*.installedconf; do for i in $PkgDir/*.installedconf; do
test -f $i && PKGS="$PKGS $prefix$i" test -f $i && PKGS[${#PKGS[*]}]="$prefix$i"
done done
done done
echo $PKGS echo ${PKGS[*]}