diff options
author | hexcoder- <heiko@hexco.de> | 2020-03-21 10:31:39 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-03-21 10:31:39 +0100 |
commit | 2508008b53b3e3a891a3d4ba4d73d554a91e5c16 (patch) | |
tree | bc3458e36a01ee40712064a15a5f172a51fde374 /qemu_mode/build_qemu_support.sh | |
parent | f21ff8bac85449728e0ef267afa065b7622ea70f (diff) | |
download | afl++-2508008b53b3e3a891a3d4ba4d73d554a91e5c16.tar.gz |
qemu_mode, build script: avoid which, add patch to prereqs, list all
missing prereqs in one invocation
Diffstat (limited to 'qemu_mode/build_qemu_support.sh')
-rwxr-xr-x | qemu_mode/build_qemu_support.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/qemu_mode/build_qemu_support.sh b/qemu_mode/build_qemu_support.sh index 09c04e7f..8dff0461 100755 --- a/qemu_mode/build_qemu_support.sh +++ b/qemu_mode/build_qemu_support.sh @@ -62,15 +62,15 @@ if [ ! -f "../afl-showmap" ]; then fi +PREREQ_NOTFOUND= +for i in libtool wget python automake autoconf sha384sum bison iconv patch; do -for i in libtool wget python automake autoconf sha384sum bison iconv; do - - T=`which "$i" 2>/dev/null` + T=`type "$i" | awk '{print $NF}' 2>/dev/null` if [ "$T" = "" ]; then echo "[-] Error: '$i' not found, please install first." - exit 1 + PREREQ_NOTFOUND=1 fi @@ -79,7 +79,7 @@ done if [ ! -d "/usr/include/glib-2.0/" -a ! -d "/usr/local/include/glib-2.0/" ]; then echo "[-] Error: devel version of 'glib2' not found, please install first." - exit 1 + PREREQ_NOTFOUND=1 fi @@ -90,6 +90,10 @@ if echo "$CC" | grep -qF /afl-; then fi +if [ "$PREREQ_NOTFOUND" == "1" ]; then + exit 1 +fi + echo "[+] All checks passed!" ARCHIVE="`basename -- "$QEMU_URL"`" |