我有这样的运行作为一个Shell脚本目标在我的Xcode项目“附近意外的标记‘elif的’语法错误”如何解决shell错误
# shell script goes here
genstrings -u -a -o en.lproj *[hmc] */*[hmc] */*/*[hmc]
if [ -f "$PROJECT_DIR/build/Release-macosx/UnicodeEscape" ] then
build/Release-macosx/UnicodeEscape "en.lproj/Localizable.strings"
elif [ -f "$PROJECT_DIR/build/Debug-macosx/UnicodeEscape" ] then
build/Debug-macosx/UnicodeEscape "en.lproj/Localizable.strings"
fi
exit 0
我得到这个错误:
/Users/aa/Dropbox/Developer/Pandamonia LLC/iPhone/Acey Deucey/build/Acey Deucey.build/Release/GenerateLocalizedStrings.build/Script-00F66869125625D9009F14DA.sh: line 7: syntax error near unexpected token
elif' /Users/aa/Dropbox/Developer/Pandamonia LLC/iPhone/Acey Deucey/build/Acey Deucey.build/Release/GenerateLocalizedStrings.build/Script-00F66869125625D9009F14DA.sh: line 7:
elif [ -f "$PROJECT_DIR/build/Debug-macosx/UnicodeEscape" ] then' Command /bin/sh failed with exit code 2
的','在声明的结尾是无用的空语句。 – Jens 2012-05-08 10:18:41
@Jens:除非你不换线。 – Benoit 2012-05-08 13:58:50
我不明白你想说什么。你能改说吗? – Jens 2012-05-08 14:04:05