From 059b912b27a50d56df4f347ef227e49945710168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andres=20L=C3=B6h?= Date: Fri, 10 Jul 2009 19:36:50 +0000 Subject: [PATCH] Efficiency fix for ghc-get-packages script. svn path=/nixpkgs/trunk/; revision=16326 --- pkgs/development/compilers/ghc/ghc-get-packages.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/ghc/ghc-get-packages.sh b/pkgs/development/compilers/ghc/ghc-get-packages.sh index 4593ead17d31..7f47cd30a151 100755 --- a/pkgs/development/compilers/ghc/ghc-get-packages.sh +++ b/pkgs/development/compilers/ghc/ghc-get-packages.sh @@ -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[*]}