summaryrefslogtreecommitdiff
path: root/scripts/getver.sh
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-10-26 14:54:57 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-10-26 14:54:57 +0000
commitad6c4198a92d503935a8d2aebd4187540460a992 (patch)
treebf4d66131f65d0d3c46eb9e369096ad8474b7c36 /scripts/getver.sh
parentf15f6bc76ffd73c934728474335f2312be32960e (diff)
downloadmtk-20170518-ad6c4198a92d503935a8d2aebd4187540460a992.zip
mtk-20170518-ad6c4198a92d503935a8d2aebd4187540460a992.tar.gz
mtk-20170518-ad6c4198a92d503935a8d2aebd4187540460a992.tar.bz2
getver.sh: cope with varying "git log" line formats to reliably extract the git-svn rev (#10268)
SVN-Revision: 28604
Diffstat (limited to 'scripts/getver.sh')
-rwxr-xr-xscripts/getver.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/getver.sh b/scripts/getver.sh
index cd9b90a..8bb384b 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -18,7 +18,7 @@ try_svn() {
try_git() {
[ -d .git ] || return 1
- REV="$(git log | grep -m 1 git-svn-id | awk '{ gsub(/.*@/, "", $2); print $2 }')"
+ REV="$(git log | grep -m 1 git-svn-id | awk '{ gsub(/.*@/, "", $0); print $1 }')"
REV="${REV:+r$REV}"
[ -n "$REV" ]
}