summaryrefslogtreecommitdiffstats
path: root/remote/setup_tools
diff options
context:
space:
mode:
authorMichael Neves2013-01-03 16:51:17 +0100
committerMichael Neves2013-01-03 16:51:17 +0100
commit449bc36e72973f151f73fc11901a4ee47192145d (patch)
treed15ee07cf263bfe29a07b1695809591f651e0022 /remote/setup_tools
parentadd libresolv to list of wanted libs in base (diff)
downloadtm-scripts-449bc36e72973f151f73fc11901a4ee47192145d.tar.gz
tm-scripts-449bc36e72973f151f73fc11901a4ee47192145d.tar.xz
tm-scripts-449bc36e72973f151f73fc11901a4ee47192145d.zip
check if file is ELF fix
Diffstat (limited to 'remote/setup_tools')
-rwxr-xr-xremote/setup_tools10
1 files changed, 6 insertions, 4 deletions
diff --git a/remote/setup_tools b/remote/setup_tools
index 95e3e0a9..f04f082c 100755
--- a/remote/setup_tools
+++ b/remote/setup_tools
@@ -49,10 +49,12 @@ copyfileswithdependencies ()
for FILENAME in ${REQUIRED_BINARIES}
do
- for f in $(find . -name ${FILENAME} -type f -executable)
- do
- [ $(file $f |grep -c ELF) -eq 1 ] && FILE=$f
- done
+ FILE=$(find . -name ${FILENAME} -type f -executable | xargs grep -l ELF)
+ if [ -z "$FILE" ]; then
+ echo "No Binary found for ${FILENAME}. Skipping."
+ echo "-----------------------------------------------------------------"
+ continue
+ fi
echo "Found ${FILENAME} at ${FILE}. Searching libraries..."
echo ${FILE} >> ${COPYFILES_LIST}
# fetch dependencies