Skip to content
Snippets Groups Projects
Commit 23be22ab authored by Michał Górny's avatar Michał Górny Committed by Kevin Harwell
Browse files

build_tools/make_version: Fix sed(1) syntax compatibility with NetBSD

Fix the sed(1) invocation used to process git-svn-id not to use "\s"
that is a GNU-ism and is not supported by NetBSD sed.  As a result,
this call did not work properly and make_version did output the full
git-svn-id line rather than the revision.

ASTERISK-29852

Change-Id: Ie4b406e2748920643446851a0a252a4ca7245772
parent 2b490787
No related branches found
No related tags found
Loading
......@@ -98,7 +98,7 @@ elif [ -d ${1}/.git ]; then
# If the first log commit messages indicates that this is checked into
# subversion, we'll just use the SVN- form of the revision.
MODIFIED=""
SVN_REV=`${GIT} log --pretty=full -1 | ${GREP} -F "git-svn-id:" | sed -e "s/.*\@\([^\s]*\)\s.*/\1/g"`
SVN_REV=`${GIT} log --pretty=full -1 | sed -n '/git-svn-id:/ s/.*\@\([^ ]*\) .*/\1/p'`
if [ -z "$SVN_REV" ]; then
MAINLINE_BRANCH=$(git config -f .gitreview --get gerrit.defaultbranch)
VERSION=`${GIT} describe --long --always --tags --dirty=M 2> /dev/null`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment