首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

shell脚本失误:syntax error near unexpected token `fi'

2012-08-30 
shell脚本出错:syntax error near unexpected token `fiexportCODESIGN_ALLOCATE/Xcode.app/Contents/De

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

热点排行