aboutsummaryrefslogtreecommitdiff
path: root/unicorn_mode
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-04-17 17:49:22 +0200
committerDominik Maier <domenukk@gmail.com>2020-04-21 13:14:34 +0200
commitcfb11177cd40f481fdc3d29ed969f9e67b4f5541 (patch)
tree505a4cbdbd8673a4426dd5f2bd288b5d2f055e31 /unicorn_mode
parent0a1979fd2074c4e85d0a8945e18501b970731e0e (diff)
downloadafl++-cfb11177cd40f481fdc3d29ed969f9e67b4f5541.tar.gz
submodule
Diffstat (limited to 'unicorn_mode')
-rwxr-xr-xunicorn_mode/build_unicorn_support.sh33
m---------unicorn_mode/unicornafl0
2 files changed, 22 insertions, 11 deletions
diff --git a/unicorn_mode/build_unicorn_support.sh b/unicorn_mode/build_unicorn_support.sh
index 8297e13f..0c84c07b 100755
--- a/unicorn_mode/build_unicorn_support.sh
+++ b/unicorn_mode/build_unicorn_support.sh
@@ -33,7 +33,7 @@
# You must make sure that Unicorn Engine is not already installed before
# running this script. If it is, please uninstall it first.
-UNICORNAFL_VERSION='afl++2.64c'
+UNICORNAFL_VERSION="$(cat ./UNICORNAFL_VERSION)"
echo "================================================="
echo "UnicornAFL build script"
@@ -146,21 +146,32 @@ fi
echo "[+] All checks passed!"
echo "[*] Making sure unicornafl is checked out"
-rm -rf unicornafl # workaround for travis ... sadly ...
-#test -d unicorn && { cd unicorn && { git stash ; git pull ; cd .. ; } }
-test -d unicornafl || {
- CNT=1
- while [ '!' -d unicornafl -a "$CNT" -lt 4 ]; do
- echo "Trying to clone unicornafl (attempt $CNT/3)"
- git clone https://github.com/AFLplusplus/unicornafl
- CNT=`expr "$CNT" + 1`
- done
-}
+
+git status 1>/dev/null 2>/dev/null
+if [ $? -eq 0 ]; then
+ echo "[*] initializing unicornafl submodule"
+ git submodule init || exit 1
+ git submodule update 2>/dev/null # ignore errors
+else
+ echo "[*] cloning unicornafl"
+ rm -rf unicornafl # workaround for travis ... sadly ...
+ #test -d unicorn && { cd unicorn && { git stash ; git pull ; cd .. ; } }
+ test -d unicornafl || {
+ CNT=1
+ while [ '!' -d unicornafl -a "$CNT" -lt 4 ]; do
+ echo "Trying to clone unicornafl (attempt $CNT/3)"
+ git clone https://github.com/AFLplusplus/unicornafl
+ CNT=`expr "$CNT" + 1`
+ done
+ }
+fi
+
test -d unicornafl || { echo "[-] not checked out, please install git or check your internet connection." ; exit 1 ; }
echo "[+] Got unicornafl."
cd "unicornafl" || exit 1
echo "[*] Checking out $UNICORNAFL_VERSION"
+sh -c 'git stash && git stash drop' 1>/dev/null 2>/dev/null
git checkout "$UNICORNAFL_VERSION" || exit 1
echo "[*] making sure config.h matches"
diff --git a/unicorn_mode/unicornafl b/unicorn_mode/unicornafl
new file mode 160000
+Subproject 89fd1f66912c8e0918ba0658b16bda204607e44