A better way to copy the data directory.

master
dak180 2011-01-23 20:09:52 -05:00
parent d39112244b
commit 70baa03ffb
1 changed files with 1 additions and 1 deletions

View File

@ -3484,7 +3484,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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 \"${tstgit}\" ]; then\n revck=`git rev-parse HEAD`\n mck=`git status --porcelain ${datadir}`\nelif [ -d \"${tsthg}\" ]; then\n revck=`hg ident | sed -e 's:+::'`\n mck=`hg status ${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";
shellScript = "# Config\nexport PATH=$PATH:/sw/bin:/opt/local/bin\ndestdata=\"build/${CONFIGURATION}/Warzone.app/Contents/Resources/\"\ndatadir=\"../data\"\n\nif ! rsync -vcrlpt --del ${datadir} \"${destdata}\"; then\n exit ${?}\nfi\n\nexit 0";
};
02F5CC4F0D148FC30000A2D0 /* Create database.c */ = {
isa = PBXShellScriptBuildPhase;