Browse Source

Fix the wrong bash if syntax for checking the existence of perl tool.

Yao Wei Tjong 姚伟忠 11 years ago
parent
commit
2b05124ff6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cmake_macosx.sh

+ 2 - 2
cmake_macosx.sh

@@ -52,8 +52,8 @@ if [ "$1" == "-DIOS=1" -a -e $BUILD/CMakeScripts/install_postBuildPhase.makeDebu
 fi
 fi
 
 
 # Set Xcode build settings to skip dSYM file generation for Debug configuration (other configurations still use the default dwarf-with-dsym)
 # Set Xcode build settings to skip dSYM file generation for Debug configuration (other configurations still use the default dwarf-with-dsym)
-if [ "$1" == "-DIOS=1" -a $(perl -v >/dev/null 2>&1) -e $BUILD/*.xcodeproj/project.pbxproj ]; then
-    perl -i -pe 'BEGIN { $/ = undef; } s/(Begin XCBuildConfiguration.*?Debug.*?Settings = {\n)/\1DEBUG_INFORMATION_FORMAT = dwarf;\n/s' $BUILD/*.xcodeproj/project.pbxproj
+if [ "$1" == "-DIOS=1" -a -e $BUILD/*.xcodeproj/project.pbxproj ] && perl -v >/dev/null 2>&1; then
+    perl -i -pe 'BEGIN {$/=undef} s/(Begin XCBuildConfiguration.*?Debug.*?Settings = {\n)/\1DEBUG_INFORMATION_FORMAT = dwarf;\n/s' $BUILD/*.xcodeproj/project.pbxproj
 fi
 fi
 
 
 # vi: set ts=4 sw=4 expandtab:
 # vi: set ts=4 sw=4 expandtab: