about summary refs log tree commit diff
path: root/unicorn_mode
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2022-01-30 20:59:24 +0100
committerGitHub <noreply@github.com>2022-01-30 20:59:24 +0100
commit2d9325aed9bde0630162a5efaac33a2a8f5bb252 (patch)
treebbb0cf0f8620b71d315dcc449018affd3ea5b33a /unicorn_mode
parent143c9d175e9357ba548413ee7dcee6a8de23f733 (diff)
parent53eb5ba2fbfa75e1c008239bf5d54238bfadb148 (diff)
downloadafl++-2d9325aed9bde0630162a5efaac33a2a8f5bb252.tar.gz
Merge pull request #1319 from AFLplusplus/dev
push to stable
Diffstat (limited to 'unicorn_mode')
-rwxr-xr-xunicorn_mode/build_unicorn_support.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/unicorn_mode/build_unicorn_support.sh b/unicorn_mode/build_unicorn_support.sh
index 74f9e174..80961599 100755
--- a/unicorn_mode/build_unicorn_support.sh
+++ b/unicorn_mode/build_unicorn_support.sh
@@ -161,9 +161,9 @@ if [ $? -eq 0 ]; then
   git submodule sync ./unicornafl 2>/dev/null # ignore errors
 else
   echo "[*] cloning unicornafl"
-  test -d unicornafl || {
+  test -d unicornafl/.git || {
     CNT=1
-    while [ '!' -d unicornafl -a "$CNT" -lt 4 ]; do
+    while [ '!' -d unicornafl/.git -a "$CNT" -lt 4 ]; do
       echo "Trying to clone unicornafl (attempt $CNT/3)"
       git clone https://github.com/AFLplusplus/unicornafl
       CNT=`expr "$CNT" + 1`
@@ -171,11 +171,12 @@ else
   }
 fi
 
-test -d unicornafl || { echo "[-] not checked out, please install git or check your internet connection." ; exit 1 ; }
+test -d unicornafl/.git || { 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"
+git pull
 sh -c 'git stash && git stash drop' 1>/dev/null 2>/dev/null
 git checkout "$UNICORNAFL_VERSION" || exit 1