summaryrefslogtreecommitdiff
path: root/support/scripts/copy.sh
diff options
context:
space:
mode:
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