Last active
June 28, 2022 15:58
-
-
Save jthoms1/3223bacef2906fe7c020d95699ba8c08 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
# Type a script or drag a script file from your workspace to insert # Type a script or drag a script file from your workspace to insert its path. | |
# SRCROOT | |
# TARGET_NAME | |
# BUILT_PRODUCTS_DIR | |
APP_NAME="shopwebapp" | |
EMBEDDED_DIR="${BUILT_PRODUCTS_DIR}/${TARGET_NAME}.app/portals" | |
EMBEDDED_APP="${SRCROOT}/../../web/build" | |
ZIP_FILE="${APP_NAME}.zip" | |
mkdir "${EMBEDDED_DIR}" | |
if [ -d "${EMBEDDED_DIR}/${APP_NAME}" ] | |
then | |
cd "${EMBEDDED_DIR}" | |
rm -r "${APP_NAME}" | |
fi | |
mkdir "${EMBEDDED_DIR}/${APP_NAME}" | |
if [ -d "${EMBEDDED_APP}" ] | |
then | |
cd "${EMBEDDED_APP}" | |
zip -vr "${ZIP_FILE}" * -x "*.DS_Store" | |
unzip "${ZIP_FILE}" -d "${EMBEDDED_DIR}/${APP_NAME}" | |
rm "${ZIP_FILE}" | |
else | |
echo "App ${APP_NAME} has not been built!" | |
exit 999 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment