Permalink
Browse files

Make make_git_version_header find Xcode the proper way

Uses code-select now.
  • Loading branch information...
1 parent eff8e4d commit e45002eb8f4216f8b3065001fdabc449ac5d5138 @uliwitness committed Apr 16, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 make_git_version_header.sh
@@ -38,10 +38,14 @@
# file.
#
-GIT='/Applications/Xcode.app/Contents/Developer/usr/bin/git'
-
echo -n "note: Finding revision in "
pwd
+
+XCODE=`xcode-select --print-path 2> /dev/null`
+if [ $? -ne 0 ]; then
+ XCODE=/Applications/Xcode.app/Contents/Developer
+fi
+GIT="$XCODE/usr/bin/git"
revnum=`$GIT rev-list HEAD | /usr/bin/wc -l | tr -d ' '`
fullrevnum=`$GIT rev-parse HEAD`
builddate=`date "+%Y-%m-%d"`

0 comments on commit e45002e

Please sign in to comment.