Created
March 24, 2015 09:47
-
-
Save mushu8/abca048e22e1c91ed633 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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