diff options
| -rwxr-xr-x | build.sh | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -3,6 +3,26 @@ MAKE=make # +# Check if a list of deps are installed on the host machine +# +# $@: Dep list to check +# +check_deps() { + for dep in $@ + do + printf "Checking if $dep is installed... " + which $dep &>/dev/null + if [ $? -ne 0 ] + then + echo "no" + echo "fatal: Please install '$dep'!" + exit 1 + fi + echo "yes" + done +} + +# # Ensure that the build environment is sane # build_check() { @@ -11,6 +31,12 @@ build_check() { echo "fatal: Please run '. dev/build.env'" exit 1 fi + + check_deps \ + rdar \ + clang \ + git \ + make } # |
