Skip to content

Instantly share code, notes, and snippets.

@prwhite
Last active December 31, 2015 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prwhite/7983421 to your computer and use it in GitHub Desktop.
Save prwhite/7983421 to your computer and use it in GitHub Desktop.
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