Skip to content

Instantly share code, notes, and snippets.

@prwhite prwhite/copy-headers.sh
Last active Dec 31, 2015

Embed
What would you like to do?
Script for copying header files in an Xcode library/framework project while retaining their hierarchical structure. This requires creating a headers-bom file listing relative paths to the headers to be copied. Using rsync makes things relatively painless and potentially even more efficient than other methods.
#!/bin/sh
echo PWD = ${PWD}
echo SRCROOT = ${SRCROOT}
echo BUILT_PRODUCTS_DIR = ${BUILT_PRODUCTS_DIR}
# just to be sure
cd ${SRCROOT}
# using . as source below might not be what you want... feel free to change, etc.
rsync -rtlRv --files-from=header-bom.txt . ${BUILT_PRODUCTS_DIR}/include/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.