From 569d107cce540315f637375c07e9685f25999fe7 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 25 Feb 2011 03:06:50 -0800 Subject: Drop sysroot.sh dependency on CydiaSubstrate. --- compiling.txt | 9 ++++----- sysroot.sh | 25 ++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/compiling.txt b/compiling.txt index 72d3040..bb3b719 100644 --- a/compiling.txt +++ b/compiling.txt @@ -9,10 +9,9 @@ -or- b) doing the following crazy stunts: - i) install Cydia Substrate (in beta) - ii) install Fink (the only sane choice) - iii) activate Fink (. /sw/bin/init.sh) - iv) fink install bash ldid tar wget - v) run ./sysroot.sh and wait a bit + i) install Fink (the only sane choice) + ii) activate Fink (. /sw/bin/init.sh) + ii) fink install bash ldid tar wget xz + iv) run ./sysroot.sh and wait a bit 3) type "make" to compile the executable diff --git a/sysroot.sh b/sysroot.sh index f03d3a9..71521db 100755 --- a/sysroot.sh +++ b/sysroot.sh @@ -11,8 +11,6 @@ set -e shopt -s extglob shopt -s nullglob -PATH=/Library/Cydia/bin:$PATH - rm -rf sysroot mkdir sysroot cd sysroot @@ -22,6 +20,10 @@ distribution=tangelo component=main architecture=iphoneos-arm +declare -A dpkgz +dpkgz[gz]=gunzip +dpkgz[lzma]=unlzma + wget -qO- "${repository}dists/${distribution}/${component}/binary-${architecture}/Packages.bz2" | bzcat | { regex='^([^ \t]*): *(.*)' declare -A fields @@ -31,8 +33,25 @@ 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]} + wget -O "${package}.deb" "${repository}${filename}" - dpkg-deb -x "${package}.deb" . + for z in lzma gz; do + compressed=data.tar.${z} + + if ar -x "${package}.deb" "${compressed}" 2>/dev/null; then + ${dpkgz[${z}]} "${compressed}" + break + fi + done + + if ! [[ -e data.tar ]]; then + echo "unable to extract package" 1>&2 + exit 1 + fi + + ls -la data.tar + tar -xf ./data.tar + rm -f data.tar fi unset fields -- cgit v1.2.3