summaryrefslogtreecommitdiffstats
path: root/scripts/setlocalversion
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-07-27 18:11:53 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-27 18:11:53 -0300
commiteb703027ac4ed563823e4d7824f68afed637d89a (patch)
treede35552440e7d2c7b74d0020c6a3cc1a8ed8b060 /scripts/setlocalversion
parent429e90893c9ad2c266d541c94d6ca69a34a7701d (diff)
parent837b41b5de356aa67abb2cadb5eef3efc7776f91 (diff)
Merge ../linux-2.6
Diffstat (limited to 'scripts/setlocalversion')
-rwxr-xr-xscripts/setlocalversion4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 1c1bdaf7348..83b75126c9f 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -12,7 +12,9 @@ cd "${1:-.}" || usage
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
# Do we have an untagged version?
if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then
- git describe | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
+ if tag=`git describe 2>/dev/null`; then
+ echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
+ fi
fi
# Are there uncommitted changes?