From 64b81544bdbc74bfeae700212fed490977778460 Mon Sep 17 00:00:00 2001 From: pancake Date: Tue, 26 Apr 2022 11:52:06 +0200 Subject: [PATCH] Install acr if not installed when autogening --- autogen.sh | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index c957863739..74f0a37207 100755 --- a/autogen.sh +++ b/autogen.sh @@ -5,10 +5,39 @@ # git clone https://github.com/radare/acr # # -- pancake +#!/bin/sh +# +# Look for the 'acr' tool here: https://github.com/radare/acr +# Clone last version of ACR from here: +# git clone https://github.com/radare/acr +# +# -- pancake + +r2pm -h >/dev/null 2>&1 +if [ $? = 0 ]; then + echo "Installing the last version of 'acr'..." + r2pm -i acr > /dev/null + r2pm -r acr -h > /dev/null 2>&1 + if [ $? = 0 ]; then + echo "Running 'acr -p'..." + r2pm -r acr -p + else + echo "Cannot find 'acr' in PATH" + fi +else + echo "Running acr..." + acr -p +fi +V=`./configure -qV | cut -d - -f -1` +if [ -n "$1" ]; then + echo "./configure $*" + ./configure $* +fi + files=`find . -name configure.acr` for a in ${files}; do echo "[+] $a" - ( cd `dirname $a` ; acr -p ) + ( cd `dirname $a` ; r2pm -r acr -p ) done if [ -n "$1" ]; then echo "./configure $@"