1
0

get-afl.sh 496 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. cd "${0%/*}"
  3. if [ -z "${GET_AFL_VERSION}" ]; then
  4. GET_AFL_VERSION="$(wget --quiet -O - "https://api.github.com/repos/AFLplusplus/AFLplusplus/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')"
  5. fi
  6. AFL_FILENAME="$GET_AFL_VERSION.tar.gz"
  7. AFL_URL="https://github.com/AFLplusplus/AFLplusplus/archive/$AFL_FILENAME"
  8. rm $AFL_FILENAME
  9. wget $AFL_URL || exit
  10. tar -xzvf $AFL_FILENAME
  11. rm $AFL_FILENAME
  12. cd AFLplusplus-*
  13. make source-only || exit
  14. cd ..
  15. rm -rf afl
  16. mv AFLplusplus-* afl