toaruos/util/check-reqs

38 lines
668 B
Plaintext
Raw Normal View History

#!/bin/bash
# Build Dependencies Checker
# ToAruOS Kernel / Userspace
function INFO {
2011-04-12 00:22:01 +04:00
echo -e "\033[34;1minfo\033[0m $1" >&2
}
function WARN {
echo -e "\033[33;1mwarning\033[0m $1" >&2
}
function ERROR {
echo -e "\033[31;1merror\033[0m $1" >&2
2011-04-12 00:22:01 +04:00
}
function BAIL {
exit 1
}
if [ -z `which clang` ] ; then
WARN "Missing clang"
if [ -z `which gcc` ] ; then
WARN "Missing gcc"
if [ -z `which cc` ] ; then
ERROR "No compiler found"
2011-04-12 00:22:01 +04:00
BAIL
fi
fi
fi
if [ -z `which genext2fs` ] ; then
2011-04-12 00:22:01 +04:00
ERROR "Missing genext2fs"
INFO "You can probably get it from a package of the same name."
BAIL
fi