Skip to content

Commit

Permalink
Implement Symlink option for custom frameworks too, thanks again to @…
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Bartolome committed May 16, 2010
1 parent 658bdd9 commit d4376fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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\tmkdir ./Frameworks;\n\n\tif test $LINK_FRAMEWORKS = \"YES\";\n\tthen\n\t\tln -sf $cappFrameworksPath/* Frameworks;\n\telse\n\t\tcp -rf $cappFrameworksPath/* Frameworks;\n\tfi\t\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\tif test $LINK_FRAMEWORKS = \"YES\";\n\tthen\n\t\tln -sf $objjRuntimePath/* Frameworks;\n\telse\n\t\tcp -rf $objjRuntimePath/* Frameworks;\n\tfi\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;";
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\tmkdir ./Frameworks;\n\n\tif test $LINK_FRAMEWORKS = \"YES\";\n\tthen\n\t\tln -sf $cappFrameworksPath/* Frameworks;\n\telse\n\t\tcp -rf $cappFrameworksPath/* Frameworks;\n\tfi\t\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\tif test $LINK_FRAMEWORKS = \"YES\";\n\tthen\n\t\tln -sf $objjRuntimePath/* Frameworks;\n\telse\n\t\tcp -rf $objjRuntimePath/* Frameworks;\n\tfi\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\tif test $LINK_FRAMEWORKS = \"YES\";\n\tthen\n\t\tln -sf $CUSTOM_FRAMEWORKS ./Frameworks/;\n\telse\n\t\tcp -rf $CUSTOM_FRAMEWORKS ./Frameworks/;\n\tfi\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;";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
Loading

0 comments on commit d4376fa

Please sign in to comment.