shell脚本出错:syntax error near unexpected token `fi'
export
CODESIGN_ALLOCATE=/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platf
orm/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ] || [ "${PLATFORM_NAME}" ==
"ipados" ]; then
/Xcode.app/Contents/Developer/iphoneentitlements/gen_entitlements.py
"my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/
${PROJECT_NAME}.xcent";
codesign -f -s "iPhone Developer" --entitlements
"${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent"
"${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi
以上为运行的脚本,请问哪里错了啊,本人第一次接触shell,不懂啊。
[解决办法]
if [ "${PLATFORM_NAME}" == "iphoneos" ] || [ "${PLATFORM_NAME}" ==
"ipados" ]; then
这个断行了吧,接在一起看看
if [ "${PLATFORM_NAME}" == "iphoneos" ] || [ "${PLATFORM_NAME}" == "ipados" ]; then