summaryrefslogtreecommitdiffstats
path: root/remote/setup_tools
diff options
context:
space:
mode:
authorMichael Neves2013-01-08 13:45:41 +0100
committerMichael Neves2013-01-08 13:45:41 +0100
commit055182a1a65cedfc3b5d41093fe6e0c6e2e5d497 (patch)
tree0a847bfdd2dd81253adb96120819274c76037f7b /remote/setup_tools
parentcheck if file is ELF fix (diff)
downloadtm-scripts-055182a1a65cedfc3b5d41093fe6e0c6e2e5d497.tar.gz
tm-scripts-055182a1a65cedfc3b5d41093fe6e0c6e2e5d497.tar.xz
tm-scripts-055182a1a65cedfc3b5d41093fe6e0c6e2e5d497.zip
xorg & ldm
Diffstat (limited to 'remote/setup_tools')
-rwxr-xr-xremote/setup_tools39
1 files changed, 37 insertions, 2 deletions
diff --git a/remote/setup_tools b/remote/setup_tools
index f04f082c..ebfb1995 100755
--- a/remote/setup_tools
+++ b/remote/setup_tools
@@ -95,8 +95,43 @@ copyfileswithdependencies ()
done
done
- echo "Copying required directories and files from config file..."
- for ENTRY in ${REQUIRED_DIRECTORIES} ${REQUIRED_FILES}
+ echo "Copying required directories from config file..."
+ for ENTRY in ${REQUIRED_DIRECTORIES}
+ do
+ echo ".${ENTRY}" >> ${COPYFILES_LIST}
+ for LIB in $(find .${ENTRY} -type f | xargs grep -l ELF)
+ do
+ for i in $(ldd ${LIB} |awk '{print $1 $2 $3}'|grep -v ld-linux|grep -v libc.so*|grep -v linux-gate)
+ do
+ arrIN=(${i//=>/ })
+ echo "--------------------------------------------------------"
+ echo "Searching ${arrIN[0]} under $(pwd)..."
+ LOCAL_MATCHES=$(find . -name $(echo ${arrIN[0]}|awk -F "." '{print $1}').*)
+ if [ "x${LOCAL_MATCHES}" != "x" ];
+ then
+ for llib in ${LOCAL_MATCHES};
+ do
+ echo "Copying ${llib}"
+ echo ${llib} >> ${COPYFILES_LIST}
+ done
+ else
+ echo "Did not found ${arrIN[0]} in $(pwd)"
+ if [ -e ${arrIN[1]} ];
+ then
+ echo -n "Trying ${arrIN[1]} ..."
+ echo " found! Copying."
+ echo ${arrIN[1]} >> ${COPYFILES_LIST}
+ [ -L ${arrIN[1]} ] && echo $(readlink -f ${arrIN[1]}) >> ${COPYFILES_LIST}
+ fi
+ fi
+ done
+ echo "Copied ${LIB}."
+ echo "-----------------------------------------------------------------"
+ done
+ done
+
+ echo "Copying required files from config file..."
+ for ENTRY in ${REQUIRED_FILES}
do
echo ".${ENTRY}" >> ${COPYFILES_LIST}
done