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
This commit is contained in:
Michael Lotz
2011-05-24 19:23:56 +00:00
parent bccbe7a7b9
commit 85d9520ec4
+12 -2
View File
@@ -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