growl /

#We do this so that people who launch Xcode from the UI will be able to run
#hg.  If we come across any other paths here where people would install
#hg by default, we should add them here.

#this is done because the mercurial source install seems to put it in this location
export PYTHONPATH="$PYTHONPATH:/usr/local/lib/python2.6/site-packages"

#this is done because Xcode won't actually run the script if the output file already exists, which is bad

#hg parent will present two revisions if the user has a pending merge.
#The user probably shouldn't be building in such a circumstance, but,
#nonetheless, we should handle it sanely. We do this by only showing the
#first parent.
REVISION=`hg parent --template="{rev}\n" | head -n1`
if [[ "x$REVISION" = "x" ]]; then
	#This is not an hg repository. It's probably an archive. Try to determine the archived revision.
	REVISION=`/usr/bin/sed -E -n '/^node:/{ s/node: //; s/^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]).*/\1/; p; q; }' < "${SRCROOT}/.hg_archival.txt"`
	if [[ "x$REVISION" = "x" ]]; then
		#Not an archive, either. Weird.

mkdir -p "`dirname "$HEADERPATH"`"

if [[ -f "$HEADERPATH" ]]; then
	#Determine whether the header already contains our current revision.
	pushd Tools/printRevision > /dev/null
	make HEADERPATH="../../$HEADERPATH" > /dev/null
	popd > /dev/null

	if [[ "$REVISION" -eq "$LAST_REVISION" ]]; then
		#The revision has not changed! No need to rewrite the file.
		exit 0

echo "*** Building Growl Revision: $REVISION"

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.