aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGravatar John Voltz <john.voltz@gmail.com>2008-03-11 13:12:39 +0000
committerGravatar John Voltz <john.voltz@gmail.com>2008-03-11 13:12:39 +0000
commitd45de0ca0c89c076d03ef60c1edeed877dff5bd2 (patch)
tree21e8daab7208c0b555c4f5bb2477a00d1e985c13 /scripts
parent1afe0e87c498dddf9fc7170a3d61f9ca61b2224d (diff)
downloadbuildroot-d45de0ca0c89c076d03ef60c1edeed877dff5bd2.tar.gz
buildroot-d45de0ca0c89c076d03ef60c1edeed877dff5bd2.tar.bz2
more robust development files in target handler
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/copy.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/copy.sh b/scripts/copy.sh
new file mode 100755
index 0000000000..613c4dd0ab
--- /dev/null
+++ b/scripts/copy.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+STAGING_DIR=$1
+TARGET_DIR=$2
+
+echo "Copying development files to target..."
+
+cp -a ${STAGING_DIR}/usr/include ${TARGET_DIR}/usr
+
+for LIBSDIR in /lib /usr/lib; do
+ for WILDCARD in *.a *.la; do
+ for FILE_PATH in `find ${STAGING_DIR}${LIBSDIR} -name ${WILDCARD}`; do
+ STAGING_STRIPPED=${FILE_PATH##${STAGING_DIR}}
+ EXTENDED_DIR=${PATH_FILE%/${WILDCARD}}
+ mkdir -p ${TARGET_DIR}${EXTENDED_DIR}
+ cp ${FILE_PATH} ${TARGET_DIR}${STAGING_STRIPPED}
+ #echo ${TARGET_DIR}${STAGING_STRIPPED}
+ done
+ done
+done