diff options
Diffstat (limited to 'remote/setup_tools')
| -rwxr-xr-x | remote/setup_tools | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/remote/setup_tools b/remote/setup_tools index 76f163f5..2df84a5d 100755 --- a/remote/setup_tools +++ b/remote/setup_tools @@ -47,7 +47,7 @@ copyfileswithdependencies () [ ! -z "${REQUIRED_BINARIES}" ] && pinfo "Gathering required binaries from config file..." for FILENAME in ${REQUIRED_BINARIES} do - FILE=$(find . -name ${FILENAME} -type f -executable | xargs grep -l '^.ELF') # FIXME: What happens on multiple matches? Maybe add " | head -1" + FILE=$(find . -name "${FILENAME}" -type f -executable | xargs grep -l -E '^(.ELF|#!)' | head -1) if [ -z "$FILE" ]; then pwarning "\tNo Binary found for ${FILENAME}. Skipping." continue @@ -57,8 +57,8 @@ copyfileswithdependencies () # fetch dependencies # quick fix to exclude libc*, else it copies unneeded libs... # workaround for - ldd ${FILE} &>/dev/null - ldd_exit_code=$? + ldd "${FILE}" &>/dev/null + local ldd_exit_code=$? if [ "x$ldd_exit_code" != "x0" ]; then pdebug "\tldd $FILE failed." @@ -67,7 +67,7 @@ copyfileswithdependencies () for i in $(ldd "${FILE}" | awk '{print $1 $2 $3}' | grep -v ld-linux | grep -v libc.so | grep -v linux-gate | grep -v linux-vdso) do arrIN=(${i//=>/ }) - pdebug "* ${arrIN[0]}" + pdebug "Processing lib ${arrIN[0]}" LOCAL_MATCHES=$(find . -name "$(echo ${arrIN[0]} | awk -F '.' '{print $1}')".so\*) if [ "x${LOCAL_MATCHES}" != "x" ]; then |
