diff options
| author | Chloe M. <chloe@aptel.org> | 2026-08-20 06:07:52 +0000 |
|---|---|---|
| committer | Chloe M. <chloe@aptel.org> | 2026-08-20 06:07:52 +0000 |
| commit | 28438dc30083f8cecfbe58ed0990a0b684e5e702 (patch) | |
| tree | 8e29b680ec43fd84792cff5d903e1acaf0423246 /build.sh | |
| parent | 968f5521418f14c1a8f0232e7ad4e1ba0fdcf628 (diff) | |
build: Check if deps are installed
Signed-off-by: Chloe M. <chloe@aptel.org>
Diffstat (limited to 'build.sh')
| -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 } # |
