Skip to content

Instantly share code, notes, and snippets.

@marcin-maciukiewicz
Created April 6, 2010 23:20
Show Gist options
  • Save marcin-maciukiewicz/358260 to your computer and use it in GitHub Desktop.
Save marcin-maciukiewicz/358260 to your computer and use it in GitHub Desktop.
# Destination root for the framework
DESTROOT="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}-${CURRENT_PROJECT_VERSION}"
mkdir -p "${DESTROOT}"
#
IPHONE_DEST="${DESTROOT}/iPhone Framework"
DOC_DEST="${DESTROOT}/Documentation"
# Populate the framework folder
mkdir -p "${IPHONE_DEST}"
tar -C "${BUILT_PRODUCTS_DIR}" -cf - "${PRODUCT_NAME}.framework" | tar -C "${IPHONE_DEST}" -xf -
# Build documentation (or not)
BUILD_DOCUMENTATION="no"
if [ -x `which doxygen` -a "${BUILD_DOCUMENTATION}" = "yes" ]; then
pushd "${SRCROOT}" >/dev/null
doxygen
if [ $? != 0 ]; then
echo "ERROR: Documentation generation failed" >/dev/stderr
exit 1
fi
popd >/dev/null
rm -rf "${DOC_DEST}"
mv Documentation "${DOC_DEST}"
else
echo "WARNING: Doxygen not available, skipping documentation generation" >/dev/stderr
fi
# Create the framework disk image
rm -f "${DESTROOT}.dmg"
hdiutil create -srcfolder "${DESTROOT}" "${DESTROOT}.dmg"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment