summaryrefslogtreecommitdiff
path: root/sysroot.sh
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-02-25 03:51:42 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-07 02:41:18 -0800
commit8a2c6d14978ee52cfb6b90973a8b05b0338a098d (patch)
tree31023961a86951763784e85c9475a9cc66894d0a /sysroot.sh
parent0ed60f3289608de917c304d027eb99c4bdc84ae2 (diff)
Add some execution failsafes for sysroot.sh.
Diffstat (limited to 'sysroot.sh')
-rwxr-xr-xsysroot.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysroot.sh b/sysroot.sh
index 71521db..5e87c3c 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