diff options
| author | van Hauser <vh@thc.org> | 2022-01-30 20:59:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-30 20:59:24 +0100 |
| commit | 2d9325aed9bde0630162a5efaac33a2a8f5bb252 (patch) | |
| tree | bbb0cf0f8620b71d315dcc449018affd3ea5b33a /custom_mutators/grammar_mutator | |
| parent | 143c9d175e9357ba548413ee7dcee6a8de23f733 (diff) | |
| parent | 53eb5ba2fbfa75e1c008239bf5d54238bfadb148 (diff) | |
| download | afl++-2d9325aed9bde0630162a5efaac33a2a8f5bb252.tar.gz | |
Merge pull request #1319 from AFLplusplus/dev
push to stable
Diffstat (limited to 'custom_mutators/grammar_mutator')
| -rwxr-xr-x | custom_mutators/grammar_mutator/build_grammar_mutator.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/custom_mutators/grammar_mutator/build_grammar_mutator.sh b/custom_mutators/grammar_mutator/build_grammar_mutator.sh index 452cb0e1..15b8b1db 100755 --- a/custom_mutators/grammar_mutator/build_grammar_mutator.sh +++ b/custom_mutators/grammar_mutator/build_grammar_mutator.sh @@ -109,9 +109,9 @@ if [ $? -eq 0 ]; then git submodule update ./grammar_mutator 2>/dev/null # ignore errors else echo "[*] cloning grammar mutator" - test -d grammar_mutator || { + test -d grammar_mutator/.git || { CNT=1 - while [ '!' -d grammar_mutator -a "$CNT" -lt 4 ]; do + while [ '!' -d grammar_mutator/.git -a "$CNT" -lt 4 ]; do echo "Trying to clone grammar_mutator (attempt $CNT/3)" git clone "$GRAMMAR_REPO" CNT=`expr "$CNT" + 1` @@ -119,11 +119,12 @@ else } fi -test -d grammar_mutator || { echo "[-] not checked out, please install git or check your internet connection." ; exit 1 ; } +test -d grammar_mutator/.git || { echo "[-] not checked out, please install git or check your internet connection." ; exit 1 ; } echo "[+] Got grammar mutator." cd "grammar_mutator" || exit 1 echo "[*] Checking out $GRAMMAR_VERSION" +git pull >/dev/null 2>&1 sh -c 'git stash && git stash drop' 1>/dev/null 2>/dev/null git checkout "$GRAMMAR_VERSION" || exit 1 echo "[*] Downloading antlr..." |
