当前位置: 技术问答>linux和unix
shell脚本出错:syntax error near unexpected token `fi'
来源: 互联网 发布时间:2017-04-01
本文导语: 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_entitlemen...
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,不懂啊。
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
"ipados" ]; then
这个断行了吧,接在一起看看
if [ "${PLATFORM_NAME}" == "iphoneos" ] || [ "${PLATFORM_NAME}" == "ipados" ]; then