From a3392007cd7cac492e746e0e7d989355d9ae21dd Mon Sep 17 00:00:00 2001 From: hexcoder Date: Thu, 14 May 2020 20:30:00 +0200 Subject: next try --- unicorn_mode/build_unicorn_support.sh | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/unicorn_mode/build_unicorn_support.sh b/unicorn_mode/build_unicorn_support.sh index b244c29f..a5b2b274 100755 --- a/unicorn_mode/build_unicorn_support.sh +++ b/unicorn_mode/build_unicorn_support.sh @@ -106,28 +106,20 @@ for i in $PYTHONBIN automake autoconf git $MAKECMD $TARCMD; do fi done -set -x -ls -lRa /opt/pyenv -ls -lRa ~/.local + # some python version should be available now PYTHONS="`command -v python3` `command -v python` `command -v python2`" EASY_INSTALL_FOUND=0 for PYTHON in $PYTHONS ; do - # work around for installs with executable easy_install - MYPYTHONPATH=`${PYTHON} -v &1 >/dev/null | sed -n -e '/^# \/.*\/os.py/{ s/.*matches //; s/os.py$//; p;}'` - for PATHCANDIDATE in \ - "dist-packages/" \ - "site-packages/" - do - if [ -e "${MYPYTHONPATH}/${PATHCANDIDATE}/easy_install.py" ] ; then + # slow, but should work + if $PYTHON -c "help('modules');" 2>/dev/null | grep -q easy_install ; then - EASY_INSTALL_FOUND=1 - PYTHONBIN=$PYTHON - break + EASY_INSTALL_FOUND=1 + PYTHONBIN=$PYTHON + break - fi - done + fi done if [ "0" = $EASY_INSTALL_FOUND ]; then @@ -136,7 +128,7 @@ if [ "0" = $EASY_INSTALL_FOUND ]; then PREREQ_NOTFOUND=1 fi -set +x + if echo "$CC" | grep -qF /afl-; then echo "[-] Error: do not use afl-gcc or afl-clang to compile this tool." -- cgit 1.4.1