From 8a2c6d14978ee52cfb6b90973a8b05b0338a098d Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 25 Feb 2011 03:51:42 -0800 Subject: [PATCH] Add some execution failsafes for sysroot.sh. --- makefile | 7 ++++++- sysroot.sh | 12 ++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 2a227cc6..57b04869 100644 --- 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; } diff --git a/sysroot.sh b/sysroot.sh index 71521dbf..5e87c3c4 100755 --- a/sysroot.sh +++ b/sysroot.sh @@ -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 -- 2.45.2