[Asterisk-code-review] Fix sed(1) syntax compatibility with NetBSD (asterisk[master])

Jaco Kroon asteriskteam at digium.com
Thu Dec 16 00:13:49 CST 2021


Jaco Kroon has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/17704 )


Change subject: Fix sed(1) syntax compatibility with NetBSD
......................................................................

Fix sed(1) syntax compatibility with NetBSD

\s is a GNUism, unavailable in NetBSD sed.  use the POSIX [[:space:]]
syntax instead.

MichaƂ supplied me with this patch to submit.

Change-Id: Ie4b406e2748920643446851a0a252a4ca7245772
Signed-off-by: Jaco Kroon <jaco at uls.co.za>
---
M build_tools/make_version
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/04/17704/1

diff --git a/build_tools/make_version b/build_tools/make_version
index ad9fb3f..847649c 100755
--- a/build_tools/make_version
+++ b/build_tools/make_version
@@ -98,7 +98,7 @@
     # 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 | ${GREP} -F "git-svn-id:" | sed -e "s/.*\@\([^[:space:]]*\)[[:space:]].*/\1/g"`
     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`

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17704
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ie4b406e2748920643446851a0a252a4ca7245772
Gerrit-Change-Number: 17704
Gerrit-PatchSet: 1
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211216/0610478a/attachment-0001.html>


More information about the asterisk-code-review mailing list