# Type a script or drag a script file from your workspace to insert its path. if [ "${ACTION}" = "build" ] then INSTALL_Path=${SRCROOT}/Products INSTALL_DIR=${INSTALL_Path}/${PROJECT_NAME}.framework echo "合并包:${INSTALL_DIR}" DEVICE_DIR=${BUILD_ROOT}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework echo "真机包:${DEVICE_DIR}" SIMULATOR_DIR=${BUILD_ROOT}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework echo "模拟器包:${SIMULATOR_DIR}"
#如果真机包或模拟包不存在,则退出合并 if [ ! -d "${SIMULATOR_DIR}" ] then echo "模拟器包不存在" exit 0 fi
if [ ! -d "${DEVICE_DIR}" ] then echo "真机包不存在" exit 0 fi
#如果合并包已经存在,则替换 if [ ! -f "${INSTALL_DIR}" ] then echo "合并包不存在" else echo "合并包存在,则替换" rm -rf "${INSTALL_Path}" fi
a 文件打包脚本# Type a script or drag a script file from your workspace to insert its path.#! /bin/bashif [ "${ACTION}" = "build" ]thenINSTALL_Path=${SRCROOT}/ProductsINSTALL_DIR=${INSTALL_Path}/lib...