ghc-get-packages.sh no array at all: roughly 20% faster

svn path=/nixpkgs/trunk/; revision=16399
This commit is contained in:
Marc Weber 2009-07-16 15:18:21 +00:00
parent f6e24fddbe
commit eccd5d5a41

View file

@ -11,11 +11,10 @@ else
fi
PATH="$2:$PATH"
IFS=":"
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"
# output takes place here
test -f $i && echo -n " $prefix$i"
done
done
echo ${PKGS[*]}