From 85d9520ec42dfe58d2d6e0d9f9c9750b00df7835 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 24 May 2011 19:23:56 +0000 Subject: [PATCH] Use gsed instead of sed on Mac OS X as the builtin sed doesn't support all the options we need. This still requires gsed to be installed from ports. Fixes #7563. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41719 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/scripts/determine_haiku_revision | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/build/scripts/determine_haiku_revision b/build/scripts/determine_haiku_revision index 7d0086a694..08048afb55 100644 --- a/build/scripts/determine_haiku_revision +++ b/build/scripts/determine_haiku_revision @@ -14,7 +14,7 @@ determineGitRevision() # last build if [ -z "$revision" -o "$lastBuiltRevision" != "$localRev" ]; then haikuBranch=`git describe --abbrev=0 --match 'haiku/*.base' \ - | sed -re 's/haiku\/(.*)\.base/\1/'` + | $SED -re 's/haiku\/(.*)\.base/\1/'` if [ -z "$haikuBranch" ]; then echo "*** unable to find haiku branch the build is based on" exit 1; @@ -71,6 +71,16 @@ determineHaikuRevision() haikuTop=$1 haikuBuildOutputDir=$2 + case $(uname) in + Darwin) + SED=gsed + ;; + *) + SED=sed + ;; + esac + export SED + originalDir=`pwd` cd ${haikuTop} export LC_ALL=C @@ -86,7 +96,7 @@ determineHaikuRevision() revision=`(cd ${haikuTop} && hg log --no-merges --template "{desc|firstline}\n") 2> /dev/null | grep --max-count=1 "(svn r" | - sed -n -e 's,(svn r\(.*\)).*,\1,p'` + $SED -n -e 's,(svn r\(.*\)).*,\1,p'` fi if [ "$revision" = "" ]; then revision=0