summaryrefslogtreecommitdiffstats
path: root/support/scripts/copy.sh
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2011-08-31 23:35:02 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-09-17 08:14:11 +0200
commitf082c7c5cf72296566dcf92bba4fcb4c95f2186f (patch)
tree755b968c86505d8746ba179a2e3751d0f0415703 /support/scripts/copy.sh
parent3e304db0f0ef583efb250a19663259bb6dc60c93 (diff)
downloadbuildroot-novena-f082c7c5cf72296566dcf92bba4fcb4c95f2186f.tar.gz
buildroot-novena-f082c7c5cf72296566dcf92bba4fcb4c95f2186f.zip
support: move scripts/ to a new support/ directory
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'support/scripts/copy.sh')
-rwxr-xr-xsupport/scripts/copy.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/support/scripts/copy.sh b/support/scripts/copy.sh
new file mode 100755
index 000000000..508ed56af
--- /dev/null
+++ b/support/scripts/copy.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+STAGING_DIR=$1
+TARGET_DIR=$2
+
+echo "Copying development files to target..."
+
+cp -af ${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=${STAGING_STRIPPED%/${WILDCARD}}
+ mkdir -p ${TARGET_DIR}${EXTENDED_DIR}
+ cp -fa ${FILE_PATH} ${TARGET_DIR}${STAGING_STRIPPED}
+ #echo ${TARGET_DIR}${STAGING_STRIPPED}
+ done
+ done
+done