Created
April 6, 2010 23:20
-
-
Save marcin-maciukiewicz/358260 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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