Update the copy data script to work without svn.

master
dak180 2010-10-06 18:54:42 -04:00
parent 704b32b9ba
commit 269af78e68
1 changed files with 1 additions and 1 deletions

View File

@ -3633,7 +3633,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "#Config\ndestdata=\"build/${CONFIGURATION}/Warzone.app/Contents/Resources/data\"\ndatadir=\"../data\"\nsvnrevtag=`svnversion -c \"${datadir}\"`\nmtag=`echo \"${svnrevtag}\" | sed -ne 's:\\(.*\\)M$:true:p'`\n\nif [ -d \"${destdata}\" ]; then\n testsvnrevtag=`svnversion -c \"${destdata}\"`\n if [[ \"${testsvnrevtag}\" = \"${svnrevtag}\" ]] && [[ ! \"${mtag}\" = \"true\" ]]; then\n echo \"Data directory is up to date\"\n exit 0\n else\n echo \"Data directory is out of date or has local modifications; recopying\"\n rm -rf \"${destdata}\"\n mkdir -p \"${destdata}\"\n cp -pPRf \"${datadir}/\" \"${destdata}/\"\n exit 0\n fi\nelse\n mkdir -p \"${destdata}\"\n cp -pPRf \"${datadir}/\" \"${destdata}/\"\nfi\n\nexit 0";
shellScript = "# Config\nexport PATH=$PATH:/sw/bin:/opt/local/bin\ndestdata=\"build/${CONFIGURATION}/Warzone.app/Contents/Resources/data\"\ndatadir=\"../data\"\nrevckf=\"build/revck.tmp\"\ntsthg=\"../.hg\"\ntstgit=\"../.git\"\n\n# Check for hg or git\nif [ -d \"${tsthg}\" ]; then\n revck=`hg identify`\n mck=`hg status ${datadir}`\nelif [ -d \"${tstgit}\" ]; then\n revck=`git rev-parse HEAD`\n mck=`git status --porcelain ${datadir}`\nelse\n revck=\"false\"\nfi\n\n# Try to figure out if the data dir needs updating\nif [ -d \"${destdata}\" ]; then\n revtst=`cat ${revckf}`\n if [[ \"${revck}\" == \"false\" ]] || [[ -z \"${revck}\" ]];then\n echo \"Warning: State of the data directory cannot be determined; recopying\"\n rm -rf \"${destdata}\"\n mkdir -p \"${destdata}\"\n cp -pPRf \"${datadir}/\" \"${destdata}/\"\n elif [[ ! -z \"${mck}\" ]] || [[ ! \"${revck}\" = \"${revtst}\" ]];then\n echo \"Data directory is out of date or has local modifications; recopying\"\n rm -rf \"${destdata}\"\n mkdir -p \"${destdata}\"\n cp -pPRf \"${datadir}/\" \"${destdata}/\"\n else\n echo \"Data directory is up to date\"\n exit 0\n fi\nelse\n mkdir -p \"${destdata}\"\n cp -pPRf \"${datadir}/\" \"${destdata}/\"\nfi\n\n# Write out revckf\necho \"${revck}\" > ${revckf}\n\nexit 0";
};
02F5CC4F0D148FC30000A2D0 /* Create database.c */ = {
isa = PBXShellScriptBuildPhase;