Skip to content

Commit

Permalink
Update the autorevision script so we can get something out of tarball…
Browse files Browse the repository at this point in the history
…s; also some minor fixes to data copying.
  • Loading branch information
dak180 committed Nov 7, 2010
1 parent 24f2048 commit 475398b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions macosx/Warzone.xcodeproj/project.pbxproj
Expand Up @@ -3589,7 +3589,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 identify`\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/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";
};
02F5CC4F0D148FC30000A2D0 /* Create database.c */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -3700,8 +3700,8 @@
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cd ..\nexport PATH=$PATH:/sw/bin:/opt/local/bin\n\n# Wait a bit if Autorevision does not exist\ntick=0\nwhile [ ! -s \"./macosx/build/${CONFIGURATION}/Autorevision\" ]; do\n let tick=${tick}+1\n if [ ${tick} == 11 ]; then\n break\n fi\n sleep 1\ndone\n\n\nif ! ./macosx/build/${CONFIGURATION}/Autorevision +cstr . src/autorevision.h; then\n echo \"error: Could not run Autorevision\"\n exit 1\nfi\n\nsed -n 's:#define:&:p' src/autorevision.h | sed 's:\"::g' | sed -e 's:refs/heads/:branch/:' -e 's:master:Master:' -e 's:^v::' | sed -e 's:_beta: Beta :' -e 's:_rc: RC :' >macosx/build/autorevision.h\n";
shellPath = /bin/bash;
shellScript = "function hfilter {\n sed -n 's:#define:&:p' src/autorevision.h | sed 's:\"::g' | sed -e 's:refs/heads/:branch/:' -e 's:master:Master:' -e 's:^v::' | sed -e 's:_beta: Beta :' -e 's:_rc: RC :' >macosx/build/autorevision.h\n}\n\n\ncd ..\nexport PATH=$PATH:/sw/bin:/opt/local/bin\n\n# Do not run if we will not get useful information\nif [[ ! -d \".git\" ]] && [[ ! -d \".hg\" ]]; then\n if [ -f \"src/autorevision.h\" ]; then\n echo \"Not a repo.\"\n hfilter\n exit 0\n fi\nfi\n\n# Wait a bit if Autorevision does not exist\ntick=0\nwhile [ ! -s \"./macosx/build/${CONFIGURATION}/Autorevision\" ]; do\n let tick=${tick}+1\n if [ ${tick} == 11 ]; then\n break\n fi\n sleep 1\ndone\n\n\nif ! ./macosx/build/${CONFIGURATION}/Autorevision +cstr . src/autorevision.h; then\n echo \"error: Could not run Autorevision\"\n exit 1\nfi\n\nhfilter\nexit 0\n";
};
4345290E1130F84E002AD731 /* msgfmt */ = {
isa = PBXShellScriptBuildPhase;
Expand Down

0 comments on commit 475398b

Please sign in to comment.