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 - Inefficient build script when getting SDL revision number
Summary: Inefficient build script when getting SDL revision number
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.0
Hardware: x86 Mac OS X 10.6
: P2 trivial
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-23 05:42 UTC by sqook
Modified: 2011-01-24 17:48 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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