kumquat-buildroot/support/scripts/copy.sh
Thomas Petazzoni f082c7c5cf 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>
2011-09-17 08:14:11 +02:00

21 lines
532 B
Bash
Executable File

#!/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