diff options
| author | vanhauser-thc <vh@thc.org> | 2022-01-30 14:50:15 +0100 |
|---|---|---|
| committer | vanhauser-thc <vh@thc.org> | 2022-01-30 14:50:15 +0100 |
| commit | 43a7c0d601526654bb47f138b63a93d925a6e832 (patch) | |
| tree | 728ed0a0825fc695074c414f11b707da546ea694 /unicorn_mode | |
| parent | 311649f4581ff54f32bf6fe85fea357c329b0b68 (diff) | |
| download | afl++-43a7c0d601526654bb47f138b63a93d925a6e832.tar.gz | |
make build_... scripts work without afl++ git checkout
Diffstat (limited to 'unicorn_mode')
| -rwxr-xr-x | unicorn_mode/build_unicorn_support.sh | 7 |
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 |
