Guest User

Untitled

a guest
May 25th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.46 KB | None | 0 0
  1. diff --git a/Project Templates/Cappuccino/Cappuccino XIB based Application/Cappuccino.xcodeproj/project.pbxproj b/Project Templates/Cappuccino/Cappuccino XIB based Application/Cappuccino.xcodeproj/project.pbxproj
  2. index ecdd9ad..e255a13 100644
  3. --- a/Project Templates/Cappuccino/Cappuccino XIB based Application/Cappuccino.xcodeproj/project.pbxproj
  4. +++ b/Project Templates/Cappuccino/Cappuccino XIB based Application/Cappuccino.xcodeproj/project.pbxproj
  5. @@ -98,7 +98,7 @@
  6. );
  7. runOnlyForDeploymentPostprocessing = 0;
  8. shellPath = /bin/sh;
  9. - shellScript = "#!/bin/sh\n\n##################\n### CAPPUCCINO ###\n##################\n\n#validate cappuccino Frameworks path\nif test -d \"$CAPP_FRAMEWORKS_PATH\";\nthen\n\tcappFrameworksPath=$CAPP_FRAMEWORKS_PATH;\nelse\n\t#search for cappuccino frameworks with spotlight\n\tcappFrameworksPaths=$(mdfind \"kMDItemContentType == 'public.folder' && kMDItemDisplayName == 'Frameworks'\");\n\tcappFrameworksPath=\"/usr/local/narwhal/packages/cappuccino/Frameworks\";\n\tfor aCappFrameworksPath in $cappFrameworksPaths; do\n\t\tif test $aCappFrameworksPath -nt $cappFrameworksPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aCappFrameworksPath | awk '/cappuccino\\/Frameworks/')\";\n\t\t\tthen \n\t\t\t\tcappFrameworksPath=$aCappFrameworksPath;\n\t\t\telse\n\t\t\t\tif test ! -z \"$(echo $aCappFrameworksPath | awk '/objj\\/lib\\/Frameworks/')\";\n\t\t\t\tthen \n\t\t\t\t\tcappFrameworksPath=$aCappFrameworksPath;\n\t\t\t\tfi\n\t\t\tfi\n\t\tfi\n\tdone;\nfi\n\n#copy cappuccino frameworks\nif test -d $cappFrameworksPath;\nthen\n\trm -rf ./Frameworks;\n\tcp -rf $cappFrameworksPath .;\n\techo \"Copy Cappuccino Frameworks from location '$cappFrameworksPath'\";\nfi\n\n#validate cappuccino bin path\nif test -d \"$CAPP_BIN_PATH\";\nthen\n\tcappBinPath=\"$CAPP_BIN_PATH\";\nelse\n\t#search for objj bin with spotlight\n\tcappBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'nib2cib'\");\n\tcappBinPath=\"/usr/local/narwhal/packages/cappuccino/bin\";\n\tfor aCappBinPath in $cappBinPaths; do\n\t\tif test $aCappBinPath -nt $cappBinPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aCappBinPath | awk '/cappuccino\\/bin/')\";\n\t\t\t\tthen \n\t\t\t\tcappBinPath=$aCappBinPath;\n\t\t\tfi\n\t\tfi\n\tdone;\n\tcappBinPath=$(echo $cappBinPath | sed -e 's/\\/nib2cib$//');\nfi\n\necho \"Cappuccino binary path is '$cappBinPath'\";\n\n#add cappuccino bin to profile\nPATH=${PATH}:$cappBinPath;\n\n\n##################\n### OBJECTIVE-J###\n##################\n\n# validate objj runtime path\nif test -d \"$OBJJ_RUNTIME_PATH\";\nthen\n\tobjjRuntimePath=\"$OBJJ_RUNTIME_PATH\";\nelse\n\tobjjRuntimePath=\"/usr/local/narwhal/packages/objective-j/Frameworks\";\n\t#search for cappuccino frameworks with spotlight\n\tobjjRuntimePaths=$(mdfind \"kMDItemContentType == 'public.folder' && kMDItemDisplayName == 'Frameworks'\");\n\tobjjRuntimePath=\"/usr/narwhal/packages/objective-j/Frameworks\";\n\tfor aObjjRuntimePath in $objjRuntimePaths; do\n\t\tif test $aObjjRuntimePath -nt $objjRuntimePath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aObjjRuntimePath | awk '/objective-j\\/Frameworks/')\";\n\t\t\t\tthen \n\t\t\t\tobjjRuntimePath=$aObjjRuntimePath;\n\t\t\tfi\n\t\tfi\n\tdone;\nfi\n\n# copy the objective-j runtime\nif test -d $objjRuntimePath;\nthen\n\techo \"Copy Objective-J Frameworks from location '$objjRuntimePath'\";\n\tcp -rf $objjRuntimePath/* Frameworks\nfi\n\n# validate objj bin path\nif test -d \"$OBJJ_BIN_PATH\";\nthen\n\tobjjBinPath=\"$OBJJ_BIN_PATH\";\nelse\n\t#search for objj bin with spotlight\n\tobjjBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'objj'\");\n\tobjjBinPath=\"/usr/local/narwhal/packages/objective-j/bin\";\n\tfor aObjjBinPath in $objjBinPaths; do\n\t\tif test $aObjjBinPath -nt $objjBinPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aObjjBinPath | awk '/objective-j\\/bin/')\";\n\t\t\t\tthen \n\t\t\t\tobjjBinPath=$aObjjBinPath;\n\t\t\tfi\n\t\tfi\n\tdone;\n\tobjjBinPath=$(echo $objjBinPath | sed -e 's/\\/objj$//');\nfi\n\necho \"Objective-J binary path is '$objjBinPath'\";\n\n#add objj bin to profile\nPATH=${PATH}:$objjBinPath;\n\n\n###############\n### NARWHAL ###\n###############\n\n#search for narwhal bin with spotlight\nnarwhalBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'narwhal'\");\nnarwhalBinPath=\"narwhalBin\";\nfor aNarwhalBin in $narwhalBinPaths; do\n\tif test $aNarwhalBin -nt $narwhalBinPath;\n\tthen\n\t\tif test ! -z \"$(echo $aNarwhalBin | awk '/narwhal\\/bin/')\";\n\t\t\tthen \n\t\t\tnarwhalBin=$aNarwhalBin;\n\t\tfi\n\tfi\ndone;\nnarwhalBin=$(echo $narwhalBin | sed -e 's/\\/narwhal$//');\nPATH=${PATH}:$narwhalBin;\necho \"NARWHAL binary path is '$narwhalBin'\";\n\n\n### Handle custom frameworks ###\n#copy custom frameworks or files to Frameworks\nif test -n \"$CUSTOM_FRAMEWORKS\";\nthen\n\tcp -rf $CUSTOM_FRAMEWORKS ./Frameworks/\nfi\n\n\n###############\n### NIB2CIB ###\n###############\n\necho \"Check Interface Builder Files ....\";\n\n# for xib files\nxibFiles=$(find . -type f -name \"*.xib\");\nfor xibFile in $xibFiles; do\n cibFile=$(echo $xibFile | sed -e 's/\\.xib$/.cib/');\n test $xibFile -nt $cibFile && nib2cib $xibFile || echo \"- Interface Builder File '$cibFile' is up-to-date\";\ndone;\n\n# for nib files\nnibFiles=$(find . -type d -name \"*.nib\");\nfor nibFile in $nibFiles; do\n \tcibFile=$(echo $nibFile | sed -e 's/\\.nib$/.cib/');\n\ttest $nibFile -nt $cibFile && nib2cib $nibFile || echo \"- Interface Builder File \\'$cibFile\\' is up-to-date\";\ndone;\n\n\n#################\n### CORE DATA ###\n#################\n\nmomcBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'momc'\");\nmomcBin=\"momc\";\nfor aMomcBin in $momcBinPaths; do\n\tif test $aMomcBin -nt $momcBin;\n\tthen\n\t\tmomcBin=$(echo $aMomcBin | sed -e 's/\\momc$//');\n\tfi\ndone;\necho 'MOMC file location is '$momcBin'';\nPATH=${PATH}:momcBin;\n\nxcdmodels=$(find . -type d -name \"*.xcdatamodel\");\nfor xcdmodel in $xcdmodels; do\n\txccpdfile=$(echo $xcdmodel | sed -e 's/\\.xcdatamodel$/.cxcdatamodel/');\n\tmomc $xcdmodel $xccpdfile\n\tplutil -convert xml1 $xccpdfile\n\techo \"- Core Data Model '$xcdmodel' converted\";\ndone;";
  10. + shellScript = "#!/bin/sh\n\n##################\n### CAPPUCCINO ###\n##################\n\n#validate cappuccino Frameworks path\nif test -d \"$CAPP_FRAMEWORKS_PATH\";\nthen\n\tcappFrameworksPath=$CAPP_FRAMEWORKS_PATH;\nelse\n\t#search for cappuccino frameworks with spotlight\n\tcappFrameworksPaths=$(mdfind \"kMDItemContentType == 'public.folder' && kMDItemDisplayName == 'Frameworks'\");\n\tcappFrameworksPath=\"/usr/local/narwhal/packages/cappuccino/Frameworks\";\n\tfor aCappFrameworksPath in $cappFrameworksPaths; do\n\t\tif test $aCappFrameworksPath -nt $cappFrameworksPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aCappFrameworksPath | awk '/cappuccino\\/Frameworks/')\";\n\t\t\tthen \n\t\t\t\tcappFrameworksPath=$aCappFrameworksPath;\n\t\t\telse\n\t\t\t\tif test ! -z \"$(echo $aCappFrameworksPath | awk '/objj\\/lib\\/Frameworks/')\";\n\t\t\t\tthen \n\t\t\t\t\tcappFrameworksPath=$aCappFrameworksPath;\n\t\t\t\tfi\n\t\t\tfi\n\t\tfi\n\tdone;\nfi\n\n#copy cappuccino frameworks\nif test -d $cappFrameworksPath;\nthen\n\trm -rf ./Frameworks;\n\tcp -rf $cappFrameworksPath .;\n\techo \"Copy Cappuccino Frameworks from location '$cappFrameworksPath'\";\nfi\n\n#validate cappuccino bin path\nif test -d \"$CAPP_BIN_PATH\";\nthen\n\tcappBinPath=\"$CAPP_BIN_PATH\";\nelse\n\t#search for objj bin with spotlight\n\tcappBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'nib2cib'\");\n\tcappBinPath=\"/usr/local/narwhal/packages/cappuccino/bin\";\n\tfor aCappBinPath in $cappBinPaths; do\n\t\tif test $aCappBinPath -nt $cappBinPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aCappBinPath | awk '/cappuccino\\/bin/')\";\n\t\t\t\tthen \n\t\t\t\tcappBinPath=$aCappBinPath;\n\t\t\tfi\n\t\tfi\n\tdone;\n\tcappBinPath=$(echo $cappBinPath | sed -e 's/\\/nib2cib$//');\nfi\n\necho \"Cappuccino binary path is '$cappBinPath'\";\n\n#add cappuccino bin to profile\nPATH=${PATH}:$cappBinPath;\n\n\n##################\n### OBJECTIVE-J###\n##################\n\n# validate objj runtime path\nif test -d \"$OBJJ_RUNTIME_PATH\";\nthen\n\tobjjRuntimePath=\"$OBJJ_RUNTIME_PATH\";\nelse\n\tobjjRuntimePath=\"/usr/local/narwhal/packages/objective-j/Frameworks\";\n\t#search for cappuccino frameworks with spotlight\n\tobjjRuntimePaths=$(mdfind \"kMDItemContentType == 'public.folder' && kMDItemDisplayName == 'Frameworks'\");\n\tobjjRuntimePath=\"/usr/narwhal/packages/objective-j/Frameworks\";\n\tfor aObjjRuntimePath in $objjRuntimePaths; do\n\t\tif test $aObjjRuntimePath -nt $objjRuntimePath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aObjjRuntimePath | awk '/objective-j\\/Frameworks/')\";\n\t\t\t\tthen \n\t\t\t\tobjjRuntimePath=$aObjjRuntimePath;\n\t\t\tfi\n\t\tfi\n\tdone;\nfi\n\n# copy the objective-j runtime\nif test -d $objjRuntimePath;\nthen\n\techo \"Copy Objective-J Frameworks from location '$objjRuntimePath'\";\n\tcp -rf $objjRuntimePath/* Frameworks\nfi\n\n# validate objj bin path\nif test -d \"$OBJJ_BIN_PATH\";\nthen\n\tobjjBinPath=\"$OBJJ_BIN_PATH\";\nelse\n\t#search for objj bin with spotlight\n\tobjjBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'objj'\");\n\tobjjBinPath=\"/usr/local/narwhal/packages/objective-j/bin\";\n\tfor aObjjBinPath in $objjBinPaths; do\n\t\tif test $aObjjBinPath -nt $objjBinPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aObjjBinPath | awk '/objective-j\\/bin/')\";\n\t\t\t\tthen \n\t\t\t\tobjjBinPath=$aObjjBinPath;\n\t\t\tfi\n\t\tfi\n\tdone;\n\tobjjBinPath=$(echo $objjBinPath | sed -e 's/\\/objj$//');\nfi\n\necho \"Objective-J binary path is '$objjBinPath'\";\n\n#add objj bin to profile\nPATH=${PATH}:$objjBinPath;\n\n\n###############\n### NARWHAL ###\n###############\n\n#search for narwhal bin with spotlight\nnarwhalBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'narwhal'\");\nnarwhalBinPath=\"narwhalBin\";\nfor aNarwhalBin in $narwhalBinPaths; do\n\tif test $aNarwhalBin -nt $narwhalBinPath;\n\tthen\n\t\tif test ! -z \"$(echo $aNarwhalBin | awk '/narwhal\\/bin/')\";\n\t\t\tthen \n\t\t\tnarwhalBin=$aNarwhalBin;\n\t\tfi\n\tfi\ndone;\nnarwhalBin=$(echo $narwhalBin | sed -e 's/\\/narwhal$//');\nPATH=${PATH}:$narwhalBin;\necho \"NARWHAL binary path is '$narwhalBin'\";\n\n\n### Handle custom frameworks ###\n#copy custom frameworks or files to Frameworks\nif test -n \"$CUSTOM_FRAMEWORKS\";\nthen\n\tln -sF $CUSTOM_FRAMEWORKS ./Frameworks\n\n\tln -sF $CUSTOM_FRAMEWORKS ./Frameworks/Debug\nfi\n\n\n###############\n### NIB2CIB ###\n###############\n\necho \"Check Interface Builder Files ....\";\n\n# for xib files\nxibFiles=$(find . -type f -name \"*.xib\");\nfor xibFile in $xibFiles; do\n cibFile=$(echo $xibFile | sed -e 's/\\.xib$/.cib/');\n test $xibFile -nt $cibFile && nib2cib $xibFile || echo \"- Interface Builder File '$cibFile' is up-to-date\";\ndone;\n\n# for nib files\nnibFiles=$(find . -type d -name \"*.nib\");\nfor nibFile in $nibFiles; do\n \tcibFile=$(echo $nibFile | sed -e 's/\\.nib$/.cib/');\n\ttest $nibFile -nt $cibFile && nib2cib $nibFile || echo \"- Interface Builder File \\'$cibFile\\' is up-to-date\";\ndone;\n\n\n#################\n### CORE DATA ###\n#################\n\nmomcBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'momc'\");\nmomcBin=\"momc\";\nfor aMomcBin in $momcBinPaths; do\n\tif test $aMomcBin -nt $momcBin;\n\tthen\n\t\tmomcBin=$(echo $aMomcBin | sed -e 's/\\momc$//');\n\tfi\ndone;\necho 'MOMC file location is '$momcBin'';\nPATH=${PATH}:momcBin;\n\nxcdmodels=$(find . -type d -name \"*.xcdatamodel\");\nfor xcdmodel in $xcdmodels; do\n\txccpdfile=$(echo $xcdmodel | sed -e 's/\\.xcdatamodel$/.cxcdatamodel/');\n\tmomc $xcdmodel $xccpdfile\n\tplutil -convert xml1 $xccpdfile\n\techo \"- Core Data Model '$xcdmodel' converted\";\ndone;";
  11. };
  12. /* End PBXShellScriptBuildPhase section */
  13.  
  14. diff --git a/Scripts/TargetBuildScript.sh b/Scripts/TargetBuildScript.sh
  15. index bd3a068..56c5704 100644
  16. --- a/Scripts/TargetBuildScript.sh
  17. +++ b/Scripts/TargetBuildScript.sh
  18. @@ -16,11 +16,11 @@ else
  19. if test $aCappFrameworksPath -nt $cappFrameworksPath;
  20. then
  21. if test ! -z "$(echo $aCappFrameworksPath | awk '/cappuccino\/Frameworks/')";
  22. - then
  23. + then
  24. cappFrameworksPath=$aCappFrameworksPath;
  25. else
  26. if test ! -z "$(echo $aCappFrameworksPath | awk '/objj\/lib\/Frameworks/')";
  27. - then
  28. + then
  29. cappFrameworksPath=$aCappFrameworksPath;
  30. fi
  31. fi
  32. @@ -48,7 +48,7 @@ else
  33. if test $aCappBinPath -nt $cappBinPath;
  34. then
  35. if test ! -z "$(echo $aCappBinPath | awk '/cappuccino\/bin/')";
  36. - then
  37. + then
  38. cappBinPath=$aCappBinPath;
  39. fi
  40. fi
  41. @@ -79,7 +79,7 @@ else
  42. if test $aObjjRuntimePath -nt $objjRuntimePath;
  43. then
  44. if test ! -z "$(echo $aObjjRuntimePath | awk '/objective-j\/Frameworks/')";
  45. - then
  46. + then
  47. objjRuntimePath=$aObjjRuntimePath;
  48. fi
  49. fi
  50. @@ -105,7 +105,7 @@ else
  51. if test $aObjjBinPath -nt $objjBinPath;
  52. then
  53. if test ! -z "$(echo $aObjjBinPath | awk '/objective-j\/bin/')";
  54. - then
  55. + then
  56. objjBinPath=$aObjjBinPath;
  57. fi
  58. fi
  59. @@ -130,7 +130,7 @@ for aNarwhalBin in $narwhalBinPaths; do
  60. if test $aNarwhalBin -nt $narwhalBinPath;
  61. then
  62. if test ! -z "$(echo $aNarwhalBin | awk '/narwhal\/bin/')";
  63. - then
  64. + then
  65. narwhalBin=$aNarwhalBin;
  66. fi
  67. fi
  68. @@ -144,7 +144,8 @@ echo "NARWHAL binary path is '$narwhalBin'";
  69. #copy custom frameworks or files to Frameworks
  70. if test -n "$CUSTOM_FRAMEWORKS";
  71. then
  72. - cp -rf $CUSTOM_FRAMEWORKS ./Frameworks/
  73. + ln -sF $CUSTOM_FRAMEWORKS ./Frameworks
  74. + ln -sF $CUSTOM_FRAMEWORKS ./Frameworks/Debug
  75. fi
  76.  
  77.  
  78. @@ -190,4 +191,4 @@ for xcdmodel in $xcdmodels; do
  79. momc $xcdmodel $xccpdfile
  80. plutil -convert xml1 $xccpdfile
  81. echo "- Core Data Model '$xcdmodel' converted";
  82. -done;
  83. \ No newline at end of file
  84. +done;
  85. diff --git a/Target Templates/Cappuccino/Cappuccino Target.trgttmpl b/Target Templates/Cappuccino/Cappuccino Target.trgttmpl
  86. index 263ce52..1734f57 100644
  87. --- a/Target Templates/Cappuccino/Cappuccino Target.trgttmpl
  88. +++ b/Target Templates/Cappuccino/Cappuccino Target.trgttmpl
  89. @@ -14,7 +14,7 @@
  90. {
  91. Class = ShellScript;
  92. ShellPath = /bin/sh;
  93. - ShellScript = "#!/bin/sh\n\n##################\n### CAPPUCCINO ###\n##################\n\n#validate cappuccino Frameworks path\nif test -d \"$CAPP_FRAMEWORKS_PATH\";\nthen\n\tcappFrameworksPath=$CAPP_FRAMEWORKS_PATH;\nelse\n\t#search for cappuccino frameworks with spotlight\n\tcappFrameworksPaths=$(mdfind \"kMDItemContentType == 'public.folder' && kMDItemDisplayName == 'Frameworks'\");\n\tcappFrameworksPath=\"/usr/local/narwhal/packages/cappuccino/Frameworks\";\n\tfor aCappFrameworksPath in $cappFrameworksPaths; do\n\t\tif test $aCappFrameworksPath -nt $cappFrameworksPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aCappFrameworksPath | awk '/cappuccino\\/Frameworks/')\";\n\t\t\tthen \n\t\t\t\tcappFrameworksPath=$aCappFrameworksPath;\n\t\t\telse\n\t\t\t\tif test ! -z \"$(echo $aCappFrameworksPath | awk '/objj\\/lib\\/Frameworks/')\";\n\t\t\t\tthen \n\t\t\t\t\tcappFrameworksPath=$aCappFrameworksPath;\n\t\t\t\tfi\n\t\t\tfi\n\t\tfi\n\tdone;\nfi\n\n#copy cappuccino frameworks\nif test -d $cappFrameworksPath;\nthen\n\trm -rf ./Frameworks;\n\tcp -rf $cappFrameworksPath .;\n\techo \"Copy Cappuccino Frameworks from location '$cappFrameworksPath'\";\nfi\n\n#validate cappuccino bin path\nif test -d \"$CAPP_BIN_PATH\";\nthen\n\tcappBinPath=\"$CAPP_BIN_PATH\";\nelse\n\t#search for objj bin with spotlight\n\tcappBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'nib2cib'\");\n\tcappBinPath=\"/usr/local/narwhal/packages/cappuccino/bin\";\n\tfor aCappBinPath in $cappBinPaths; do\n\t\tif test $aCappBinPath -nt $cappBinPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aCappBinPath | awk '/cappuccino\\/bin/')\";\n\t\t\t\tthen \n\t\t\t\tcappBinPath=$aCappBinPath;\n\t\t\tfi\n\t\tfi\n\tdone;\n\tcappBinPath=$(echo $cappBinPath | sed -e 's/\\/nib2cib$//');\nfi\n\necho \"Cappuccino binary path is '$cappBinPath'\";\n\n#add cappuccino bin to profile\nPATH=${PATH}:$cappBinPath;\n\n\n##################\n### OBJECTIVE-J###\n##################\n\n# validate objj runtime path\nif test -d \"$OBJJ_RUNTIME_PATH\";\nthen\n\tobjjRuntimePath=\"$OBJJ_RUNTIME_PATH\";\nelse\n\tobjjRuntimePath=\"/usr/local/narwhal/packages/objective-j/Frameworks\";\n\t#search for cappuccino frameworks with spotlight\n\tobjjRuntimePaths=$(mdfind \"kMDItemContentType == 'public.folder' && kMDItemDisplayName == 'Frameworks'\");\n\tobjjRuntimePath=\"/usr/narwhal/packages/objective-j/Frameworks\";\n\tfor aObjjRuntimePath in $objjRuntimePaths; do\n\t\tif test $aObjjRuntimePath -nt $objjRuntimePath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aObjjRuntimePath | awk '/objective-j\\/Frameworks/')\";\n\t\t\t\tthen \n\t\t\t\tobjjRuntimePath=$aObjjRuntimePath;\n\t\t\tfi\n\t\tfi\n\tdone;\nfi\n\n# copy the objective-j runtime\nif test -d $objjRuntimePath;\nthen\n\techo \"Copy Objective-J Frameworks from location '$objjRuntimePath'\";\n\tcp -rf $objjRuntimePath/* Frameworks\nfi\n\n# validate objj bin path\nif test -d \"$OBJJ_BIN_PATH\";\nthen\n\tobjjBinPath=\"$OBJJ_BIN_PATH\";\nelse\n\t#search for objj bin with spotlight\n\tobjjBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'objj'\");\n\tobjjBinPath=\"/usr/local/narwhal/packages/objective-j/bin\";\n\tfor aObjjBinPath in $objjBinPaths; do\n\t\tif test $aObjjBinPath -nt $objjBinPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aObjjBinPath | awk '/objective-j\\/bin/')\";\n\t\t\t\tthen \n\t\t\t\tobjjBinPath=$aObjjBinPath;\n\t\t\tfi\n\t\tfi\n\tdone;\n\tobjjBinPath=$(echo $objjBinPath | sed -e 's/\\/objj$//');\nfi\n\necho \"Objective-J binary path is '$objjBinPath'\";\n\n#add objj bin to profile\nPATH=${PATH}:$objjBinPath;\n\n\n###############\n### NARWHAL ###\n###############\n\n#search for narwhal bin with spotlight\nnarwhalBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'narwhal'\");\nnarwhalBinPath=\"narwhalBin\";\nfor aNarwhalBin in $narwhalBinPaths; do\n\tif test $aNarwhalBin -nt $narwhalBinPath;\n\tthen\n\t\tif test ! -z \"$(echo $aNarwhalBin | awk '/narwhal\\/bin/')\";\n\t\t\tthen \n\t\t\tnarwhalBin=$aNarwhalBin;\n\t\tfi\n\tfi\ndone;\nnarwhalBin=$(echo $narwhalBin | sed -e 's/\\/narwhal$//');\nPATH=${PATH}:$narwhalBin;\necho \"NARWHAL binary path is '$narwhalBin'\";\n\n\n### Handle custom frameworks ###\n#copy custom frameworks or files to Frameworks\nif test -n \"$CUSTOM_FRAMEWORKS\";\nthen\n\tcp -rf $CUSTOM_FRAMEWORKS ./Frameworks/\nfi\n\n\n###############\n### NIB2CIB ###\n###############\n\necho \"Check Interface Builder Files ....\";\n\n# for xib files\nxibFiles=$(find . -type f -name \"*.xib\");\nfor xibFile in $xibFiles; do\n cibFile=$(echo $xibFile | sed -e 's/\\.xib$/.cib/');\n test $xibFile -nt $cibFile && nib2cib $xibFile || echo \"- Interface Builder File '$cibFile' is up-to-date\";\ndone;\n\n# for nib files\nnibFiles=$(find . -type d -name \"*.nib\");\nfor nibFile in $nibFiles; do\n \tcibFile=$(echo $nibFile | sed -e 's/\\.nib$/.cib/');\n\ttest $nibFile -nt $cibFile && nib2cib $nibFile || echo \"- Interface Builder File \\'$cibFile\\' is up-to-date\";\ndone;\n\n\n#################\n### CORE DATA ###\n#################\n\nmomcBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'momc'\");\nmomcBin=\"momc\";\nfor aMomcBin in $momcBinPaths; do\n\tif test $aMomcBin -nt $momcBin;\n\tthen\n\t\tmomcBin=$(echo $aMomcBin | sed -e 's/\\momc$//');\n\tfi\ndone;\necho 'MOMC file location is '$momcBin'';\nPATH=${PATH}:momcBin;\n\nxcdmodels=$(find . -type d -name \"*.xcdatamodel\");\nfor xcdmodel in $xcdmodels; do\n\txccpdfile=$(echo $xcdmodel | sed -e 's/\\.xcdatamodel$/.cxcdatamodel/');\n\tmomc $xcdmodel $xccpdfile\n\tplutil -convert xml1 $xccpdfile\n\techo \"- Core Data Model '$xcdmodel' converted\";\ndone;";
  94. + ShellScript = "#!/bin/sh\n\n##################\n### CAPPUCCINO ###\n##################\n\n#validate cappuccino Frameworks path\nif test -d \"$CAPP_FRAMEWORKS_PATH\";\nthen\n\tcappFrameworksPath=$CAPP_FRAMEWORKS_PATH;\nelse\n\t#search for cappuccino frameworks with spotlight\n\tcappFrameworksPaths=$(mdfind \"kMDItemContentType == 'public.folder' && kMDItemDisplayName == 'Frameworks'\");\n\tcappFrameworksPath=\"/usr/local/narwhal/packages/cappuccino/Frameworks\";\n\tfor aCappFrameworksPath in $cappFrameworksPaths; do\n\t\tif test $aCappFrameworksPath -nt $cappFrameworksPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aCappFrameworksPath | awk '/cappuccino\\/Frameworks/')\";\n\t\t\tthen \n\t\t\t\tcappFrameworksPath=$aCappFrameworksPath;\n\t\t\telse\n\t\t\t\tif test ! -z \"$(echo $aCappFrameworksPath | awk '/objj\\/lib\\/Frameworks/')\";\n\t\t\t\tthen \n\t\t\t\t\tcappFrameworksPath=$aCappFrameworksPath;\n\t\t\t\tfi\n\t\t\tfi\n\t\tfi\n\tdone;\nfi\n\n#copy cappuccino frameworks\nif test -d $cappFrameworksPath;\nthen\n\trm -rf ./Frameworks;\n\tcp -rf $cappFrameworksPath .;\n\techo \"Copy Cappuccino Frameworks from location '$cappFrameworksPath'\";\nfi\n\n#validate cappuccino bin path\nif test -d \"$CAPP_BIN_PATH\";\nthen\n\tcappBinPath=\"$CAPP_BIN_PATH\";\nelse\n\t#search for objj bin with spotlight\n\tcappBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'nib2cib'\");\n\tcappBinPath=\"/usr/local/narwhal/packages/cappuccino/bin\";\n\tfor aCappBinPath in $cappBinPaths; do\n\t\tif test $aCappBinPath -nt $cappBinPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aCappBinPath | awk '/cappuccino\\/bin/')\";\n\t\t\t\tthen \n\t\t\t\tcappBinPath=$aCappBinPath;\n\t\t\tfi\n\t\tfi\n\tdone;\n\tcappBinPath=$(echo $cappBinPath | sed -e 's/\\/nib2cib$//');\nfi\n\necho \"Cappuccino binary path is '$cappBinPath'\";\n\n#add cappuccino bin to profile\nPATH=${PATH}:$cappBinPath;\n\n\n##################\n### OBJECTIVE-J###\n##################\n\n# validate objj runtime path\nif test -d \"$OBJJ_RUNTIME_PATH\";\nthen\n\tobjjRuntimePath=\"$OBJJ_RUNTIME_PATH\";\nelse\n\tobjjRuntimePath=\"/usr/local/narwhal/packages/objective-j/Frameworks\";\n\t#search for cappuccino frameworks with spotlight\n\tobjjRuntimePaths=$(mdfind \"kMDItemContentType == 'public.folder' && kMDItemDisplayName == 'Frameworks'\");\n\tobjjRuntimePath=\"/usr/narwhal/packages/objective-j/Frameworks\";\n\tfor aObjjRuntimePath in $objjRuntimePaths; do\n\t\tif test $aObjjRuntimePath -nt $objjRuntimePath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aObjjRuntimePath | awk '/objective-j\\/Frameworks/')\";\n\t\t\t\tthen \n\t\t\t\tobjjRuntimePath=$aObjjRuntimePath;\n\t\t\tfi\n\t\tfi\n\tdone;\nfi\n\n# copy the objective-j runtime\nif test -d $objjRuntimePath;\nthen\n\techo \"Copy Objective-J Frameworks from location '$objjRuntimePath'\";\n\tcp -rf $objjRuntimePath/* Frameworks\nfi\n\n# validate objj bin path\nif test -d \"$OBJJ_BIN_PATH\";\nthen\n\tobjjBinPath=\"$OBJJ_BIN_PATH\";\nelse\n\t#search for objj bin with spotlight\n\tobjjBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'objj'\");\n\tobjjBinPath=\"/usr/local/narwhal/packages/objective-j/bin\";\n\tfor aObjjBinPath in $objjBinPaths; do\n\t\tif test $aObjjBinPath -nt $objjBinPath;\n\t\tthen\n\t\t\tif test ! -z \"$(echo $aObjjBinPath | awk '/objective-j\\/bin/')\";\n\t\t\t\tthen \n\t\t\t\tobjjBinPath=$aObjjBinPath;\n\t\t\tfi\n\t\tfi\n\tdone;\n\tobjjBinPath=$(echo $objjBinPath | sed -e 's/\\/objj$//');\nfi\n\necho \"Objective-J binary path is '$objjBinPath'\";\n\n#add objj bin to profile\nPATH=${PATH}:$objjBinPath;\n\n\n###############\n### NARWHAL ###\n###############\n\n#search for narwhal bin with spotlight\nnarwhalBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'narwhal'\");\nnarwhalBinPath=\"narwhalBin\";\nfor aNarwhalBin in $narwhalBinPaths; do\n\tif test $aNarwhalBin -nt $narwhalBinPath;\n\tthen\n\t\tif test ! -z \"$(echo $aNarwhalBin | awk '/narwhal\\/bin/')\";\n\t\t\tthen \n\t\t\tnarwhalBin=$aNarwhalBin;\n\t\tfi\n\tfi\ndone;\nnarwhalBin=$(echo $narwhalBin | sed -e 's/\\/narwhal$//');\nPATH=${PATH}:$narwhalBin;\necho \"NARWHAL binary path is '$narwhalBin'\";\n\n\n### Handle custom frameworks ###\n#copy custom frameworks or files to Frameworks\nif test -n \"$CUSTOM_FRAMEWORKS\";\nthen\n\tln -sF $CUSTOM_FRAMEWORKS ./Frameworks\n\n\tln -sF $CUSTOM_FRAMEWORKS ./Frameworks/Debug\nfi\n\n\n###############\n### NIB2CIB ###\n###############\n\necho \"Check Interface Builder Files ....\";\n\n# for xib files\nxibFiles=$(find . -type f -name \"*.xib\");\nfor xibFile in $xibFiles; do\n cibFile=$(echo $xibFile | sed -e 's/\\.xib$/.cib/');\n test $xibFile -nt $cibFile && nib2cib $xibFile || echo \"- Interface Builder File '$cibFile' is up-to-date\";\ndone;\n\n# for nib files\nnibFiles=$(find . -type d -name \"*.nib\");\nfor nibFile in $nibFiles; do\n \tcibFile=$(echo $nibFile | sed -e 's/\\.nib$/.cib/');\n\ttest $nibFile -nt $cibFile && nib2cib $nibFile || echo \"- Interface Builder File \\'$cibFile\\' is up-to-date\";\ndone;\n\n\n#################\n### CORE DATA ###\n#################\n\nmomcBinPaths=$(mdfind \"kMDItemContentType == 'public.unix-executable' && kMDItemDisplayName == 'momc'\");\nmomcBin=\"momc\";\nfor aMomcBin in $momcBinPaths; do\n\tif test $aMomcBin -nt $momcBin;\n\tthen\n\t\tmomcBin=$(echo $aMomcBin | sed -e 's/\\momc$//');\n\tfi\ndone;\necho 'MOMC file location is '$momcBin'';\nPATH=${PATH}:momcBin;\n\nxcdmodels=$(find . -type d -name \"*.xcdatamodel\");\nfor xcdmodel in $xcdmodels; do\n\txccpdfile=$(echo $xcdmodel | sed -e 's/\\.xcdatamodel$/.cxcdatamodel/');\n\tmomc $xcdmodel $xccpdfile\n\tplutil -convert xml1 $xccpdfile\n\techo \"- Core Data Model '$xcdmodel' converted\";\ndone;";
  95. },
  96. );
  97. }
Add Comment
Please, Sign In to add comment