Browse code

changes shell script to build and link mulle-scion, giving it a higher chance (but not 100%) of success

Nat! authored on 20/11/2013 23:25:40
Showing 1 changed files
... ...
@@ -344,8 +344,8 @@
344 344
 			outputPaths = (
345 345
 			);
346 346
 			runOnlyForDeploymentPostprocessing = 0;
347
-			shellPath = /bin/sh;
348
-			shellScript = "if [ ! -d $PROJECT_DIR/../MulleScion ]\nthen\n( cd $PROJECT_DIR/.. ;\ngit clone https://github.com/mulle-nat/MulleScionTemplates.git MulleScion;\ncd MulleScion\n\nxcodebuild -scheme mulle-scion -configuration Debug\nxcodebuild -scheme mulle-scion -configuration Release\n\nif [ -f \"Build/Products/Debug/mulle-scion\"]\nthen\n   echo \"failed to locate mulle-scion\" >&2\n   exit 1\nfi\n)\n\n( cd src/Resources ;\n  ln -s ../../../MulleScion/Build/Products/Debug/mulle-scion\n)\n\nfi\n\n# could optionally also \"update\" tidy\n\n";
347
+			shellPath = "/bin/sh -x";
348
+			shellScript = "old=`pwd`\n\nif [ ! -d \"$PROJECT_DIR\"/../MulleScion ]\nthen\n   cd \"$PROJECT_DIR\"/..\n   git clone \"https://github.com/mulle-nat/MulleScionTemplates.git\" MulleScion\n   cd \"$old\"\nfi\n\nif [ ! -x \"$PROJECT_DIR\"/src/Resources/mulle-scion ]\nthen\n  cd \"$PROJECT_DIR\"/../MulleScion\n\n  xcodebuild -scheme mulle-scion -configuration Debug build | egrep -A 10 -B 5 '(error):'\n  cd \"$old\"\n#   xcodebuild -scheme mulle-scion -configuration Release\nfi\n\n# now maybe link has magically reappeared ?\nif [ ! -x \"$PROJECT_DIR\"/src/Resources/mulle-scion ]\nthen\n  # some lame heuristics to find product\n  cd \"$PROJECT_DIR\"/../MulleScion\n  exe=`find . /Library/Developer /tmp -name \"mulle-scion\" -type f -perm 755 -print | grep -v Objects| head -1`\n\n  if [ ! -x \"$exe\" ]\n  then\n     echo \"failed to locate mulle-scion binary\" >&2\n     exit 1\n  fi\n\n  cd \"$PROJECT_DIR\"/src/Resources\n  ln -s -f ../../../MulleScion/\"$exe\"\n  cd \"$old\"\nfi\n\n\n# could optionally also \"update\" tidy\n\n";
349 349
 			showEnvVarsInLog = 0;
350 350
 		};
351 351
 /* End PBXShellScriptBuildPhase section */