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:
@@ -14,7 +14,7 @@ determineGitRevision()
|
|||||||
# last build
|
# last build
|
||||||
if [ -z "$revision" -o "$lastBuiltRevision" != "$localRev" ]; then
|
if [ -z "$revision" -o "$lastBuiltRevision" != "$localRev" ]; then
|
||||||
haikuBranch=`git describe --abbrev=0 --match 'haiku/*.base' \
|
haikuBranch=`git describe --abbrev=0 --match 'haiku/*.base' \
|
||||||
| sed -re 's/haiku\/(.*)\.base/\1/'`
|
| $SED -re 's/haiku\/(.*)\.base/\1/'`
|
||||||
if [ -z "$haikuBranch" ]; then
|
if [ -z "$haikuBranch" ]; then
|
||||||
echo "*** unable to find haiku branch the build is based on"
|
echo "*** unable to find haiku branch the build is based on"
|
||||||
exit 1;
|
exit 1;
|
||||||
@@ -71,6 +71,16 @@ determineHaikuRevision()
|
|||||||
haikuTop=$1
|
haikuTop=$1
|
||||||
haikuBuildOutputDir=$2
|
haikuBuildOutputDir=$2
|
||||||
|
|
||||||
|
case $(uname) in
|
||||||
|
Darwin)
|
||||||
|
SED=gsed
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
SED=sed
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
export SED
|
||||||
|
|
||||||
originalDir=`pwd`
|
originalDir=`pwd`
|
||||||
cd ${haikuTop}
|
cd ${haikuTop}
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
@@ -86,7 +96,7 @@ determineHaikuRevision()
|
|||||||
revision=`(cd ${haikuTop} &&
|
revision=`(cd ${haikuTop} &&
|
||||||
hg log --no-merges --template "{desc|firstline}\n") 2> /dev/null |
|
hg log --no-merges --template "{desc|firstline}\n") 2> /dev/null |
|
||||||
grep --max-count=1 "(svn r" |
|
grep --max-count=1 "(svn r" |
|
||||||
sed -n -e 's,(svn r\(.*\)).*,\1,p'`
|
$SED -n -e 's,(svn r\(.*\)).*,\1,p'`
|
||||||
fi
|
fi
|
||||||
if [ "$revision" = "" ]; then
|
if [ "$revision" = "" ]; then
|
||||||
revision=0
|
revision=0
|
||||||
|
|||||||
Reference in New Issue
Block a user