]> git.saurik.com Git - cydia.git/commitdiff
Parse URLs from Packages separately from extract.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 12 Mar 2011 23:25:04 +0000 (15:25 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 14 Mar 2011 12:09:08 +0000 (05:09 -0700)
sysroot.sh

index 26ecbadf741e2af347d470d5ea0e6bfa6b2df3cd..c32440a45443c965449c4d7de42fe3b646b99d52 100755 (executable)
@@ -60,6 +60,8 @@ function extract() {
     rm -f data.tar
 }
 
+declare -A urls
+
 wget -qO- "${repository}dists/${distribution}/${component}/binary-${architecture}/Packages.bz2" | bzcat | {
     regex='^([^ \t]*): *(.*)'
     declare -A fields
@@ -69,7 +71,7 @@ wget -qO- "${repository}dists/${distribution}/${component}/binary-${architecture
             package=${fields[package]}
             if [[ ${package} == *(apr|apr-lib|apt7|apt7-lib|coreutils|mobilesubstrate|pcre) ]]; then
                 filename=${fields[filename]}
-                extract "${package}" "${repository}${filename}"
+                urls[${package}]=${repository}${filename}
             fi
 
             unset fields
@@ -82,6 +84,10 @@ wget -qO- "${repository}dists/${distribution}/${component}/binary-${architecture
     done
 }
 
+for package in "${!urls[@]}"; do
+    extract "${package}" "${urls[${package}]}"
+done
+
 rm -f *.deb
 
 if substrate=$(readlink usr/include/substrate.h); then