diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2009-05-24 03:42:19 +0400 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-24 03:42:19 +0400 |
| commit | ee0736627d3347be0be2769fa7b26431f9726c9d (patch) | |
| tree | 203e2204daaec4cf005463fdf2c7bf380d6eef36 /scripts/setlocalversion | |
| parent | cf9972a921470b0a2da7906104bcd540b20e33bf (diff) | |
| parent | 0af48f42df15b97080b450d24219dd95db7b929a (diff) | |
| download | linux-ee0736627d3347be0be2769fa7b26431f9726c9d.tar.xz | |
Merge branch 'x86/urgent' into x86/setup
Resolved conflicts:
arch/x86/boot/memory.c
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'scripts/setlocalversion')
| -rwxr-xr-x | scripts/setlocalversion | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index f1c4b35bc324..32c8554f3946 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -10,18 +10,17 @@ 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? if git config --get svn-remote.svn.url >/dev/null; then - printf -- '-svn%s' "`git-svn find-rev $head`" + printf -- '-svn%s' "`git svn find-rev $head`" fi # Are there uncommitted changes? |
