]> git.saurik.com Git - cydia.git/commitdiff
Add some execution failsafes for sysroot.sh.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 25 Feb 2011 11:51:42 +0000 (03:51 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 7 Mar 2011 10:41:18 +0000 (02:41 -0800)
makefile
sysroot.sh

index 2a227cc61100935be6a01597a7a8c8f2d6ac6c80..57b0486998569d0fecc6f5c3fbb9d71badfa9c78 100644 (file)
--- a/makefile
+++ b/makefile
@@ -65,7 +65,12 @@ clean:
 Version.h:
        ./Version.h.sh
 
-MobileCydia: Version.h MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp
+sysroot:
+       @echo "Please read compiling.txt: you do not have a ./sysroot/ folder with the on-device requirements." 1>&2
+       @echo 1>&2
+       @exit 1
+
+MobileCydia: sysroot Version.h MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp
        $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(foreach m,$(filter %.m,$^),-x objective-c++ $(m)) $(flags) $(link) $(uikit)
        ldid -Slaunch.xml $@ || { rm -f $@ && false; }
 
index 71521dbff4958e042021c860982f14b3d85c5825..5e87c3c432b3d6fd92f2efd5cc904d2624b1cab1 100755 (executable)
@@ -11,6 +11,18 @@ set -e
 shopt -s extglob
 shopt -s nullglob
 
+for command in unlzma wget; do
+    if ! which "${command}" &>/dev/null; then
+        echo "Cannot run \`${command}\`. Please read compiling.txt." 1>&2
+        exit 1
+    fi
+done
+
+if tar --help | grep bsdtar &>/dev/null; then
+    echo "Running \`tar\` is bsdtar :(. Please read compiling.txt." 1>&2
+    exit 1
+fi
+
 rm -rf sysroot
 mkdir sysroot
 cd sysroot