2011-04-12 00:13:34 +04:00
|
|
|
#!/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
|
2011-04-12 00:13:34 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
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 {
|
2011-04-12 00:13:34 +04:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2012-02-06 03:40:19 +04:00
|
|
|
INFO "Checking for required tools (one-time check)..."
|
|
|
|
|
2014-03-13 06:27:44 +04:00
|
|
|
if [ -z `which cc` ] ; then
|
|
|
|
ERROR "No compiler found"
|
|
|
|
INFO "You will need a compiler to build the cross toolchain, we recommend gcc."
|
|
|
|
BAIL
|
2011-04-12 00:13:34 +04:00
|
|
|
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
|
2011-04-12 00:13:34 +04:00
|
|
|
fi
|
|
|
|
|
2012-09-04 10:40:50 +04:00
|
|
|
if [ -z `which qemu-system-i386` ] ; then
|
|
|
|
ERROR "Missing qemu"
|
|
|
|
INFO "You can probably install it from a package of the same name."
|
2012-02-06 03:40:19 +04:00
|
|
|
fi
|