diff options
| author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-05-23 20:57:31 +0100 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-05-23 20:57:31 +0100 |
| commit | a2ab67fae1ab9226679495a8d260f4e6555efc5f (patch) | |
| tree | f7de683c9c8ff0869a7e11f1d40802145d05f5b4 /scripts/setlocalversion | |
| parent | 6d0485a99366d4e0e7e725f14995c74cb7ca4499 (diff) | |
| parent | 135cad366b4e7d6a79f6369f6cb5b721985aa62f (diff) | |
| download | linux-a2ab67fae1ab9226679495a8d260f4e6555efc5f.tar.gz linux-a2ab67fae1ab9226679495a8d260f4e6555efc5f.zip | |
Merge branch 'for-rmk-devel' of git://git.pengutronix.de/git/imx/linux-2.6 into devel
Conflicts:
arch/arm/Kconfig
arch/arm/Makefile
Diffstat (limited to 'scripts/setlocalversion')
| -rwxr-xr-x | scripts/setlocalversion | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 47e75b69a2e9..32c8554f3946 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -10,13 +10,12 @@ cd "${1:-.}" || usage # Check for git and a git repo. if head=`git rev-parse --verify --short 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 - if tag=`git describe 2>/dev/null`; then - echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' - else - printf '%s%s' -g $head - fi + # Do we have an untagged tag? + if atag=`git describe 2>/dev/null`; then + echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' + # add -g${head}, if there is no usable tag + else + printf '%s%s' -g $head fi # Is this git on svn? |
