Skip to content

Instantly share code, notes, and snippets.

@mushu8
Created March 24, 2015 09:47
Show Gist options
  • Save mushu8/abca048e22e1c91ed633 to your computer and use it in GitHub Desktop.
Save mushu8/abca048e22e1c91ed633 to your computer and use it in GitHub Desktop.
set -e
DEVICE_PATH="${OBJROOT}/UninstalledProducts/${TARGET_NAME}.framework"
SIMULATOR_PATH="${SYMROOT}/../../../../Products/Debug-iphonesimulator/${TARGET_NAME}.framework"
ARCHIVE_PATH="${SRCROOT}/_Archive"
if [ "${CONFIGURATION}" = "Release" ]; then
if [ -d "${DEVICE_PATH}" ]; then
if [ -d "${SIMULATOR_PATH}" ]; then
rm -rf "${ARCHIVE_PATH}"
mkdir "${ARCHIVE_PATH}"
cp -r "${DEVICE_PATH}" "${ARCHIVE_PATH}"
lipo -create "${DEVICE_PATH}/${TARGET_NAME}" "${SIMULATOR_PATH}/${TARGET_NAME}" -output "${ARCHIVE_PATH}/${TARGET_NAME}.framework/${TARGET_NAME}"
else
echo "error: directory SIMULATOR_PATH (${SIMULATOR_PATH}) does not exist"
exit 1;
fi
else
echo "error: directory DEVICE_PATH (${DEVICE_PATH}) does not exist"
exit 1;
fi
fi
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment