We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1102

Summary: Inefficient build script when getting SDL revision number
Product: SDL Reporter: sqook
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: trivial    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Mac OS X 10.6   

Description sqook 2011-01-23 05:42:07 UTC
Sourcing the user's .bashrc is a very inefficient way to get the path to the hg executable, especially when the hg installer places it in /usr/local by default. I suggest using the following script in the "Run Script to Create SDL_revision.h":


# The official HG installer puts the binary in /usr/local/bin, so add that
# to Xcode's path and see if the hg executable is found. Otherwise, source
# the user's bash settings file as a last resort.
PATH=$PATH:/usr/local/bin
if ! which hg ; then source ~/.bashrc ; fi
sh ../../build-scripts/updaterev.sh
Comment 1 Sam Lantinga 2011-01-24 17:48:03 UTC
This is fixed in the repository, thanks!
http://hg.libsdl.org/SDL/rev/79bd1e289005