Skip to content

Instantly share code, notes, and snippets.

@tvon
Last active December 15, 2015 07:39
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tvon/5224569 to your computer and use it in GitHub Desktop.
Save tvon/5224569 to your computer and use it in GitHub Desktop.
Concatenate header files from frameworks in the iOS 6.1 SDK, as described in Mark Dalrymple's talk on headers.
#!/bin/bash
OUTDIR=~/Desktop/moby
BASE="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks"
mkdir -p ${OUTDIR}
cd ${BASE}
for dir in *
do
for file in `find $dir -name '*.h'`
do
echo "// ========== ${file}" >> ${OUTDIR}/${dir}.h
cat $file >> ${OUTDIR}/${dir}.h
done
done
cat ${OUTDIR}/*.h > ${OUTDIR}/moby.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment