summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2010-06-10 09:53:24 +0200
committerJoel Rosdahl <joel@rosdahl.net>2010-06-10 09:53:24 +0200
commit83eb86a1728567760d997d8bcccd2f6cb235bdde (patch)
tree1b6cad827cee0013dcbd7977ccb985e9afb24be3
parent2c1f49ca7d6f4b27c4205ad602b09cd5139378ea (diff)
downloadccache-83eb86a1728567760d997d8bcccd2f6cb235bdde.tar.gz
Improve formatting of git revision info
-rw-r--r--configure.ac2
-rw-r--r--dev.mk.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 151cf0af..3fc3e79e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -290,7 +290,7 @@ cat config.h >>config.h.tmp
echo '#endif' >>config.h.tmp
mv config.h.tmp config.h
-version=`(git describe --dirty 2>/dev/null || echo vunknown) | cut -b 2-`
+version=`(git describe --dirty 2>/dev/null || echo vunknown) | sed -e 's/v//' -e 's/-/+/' -e 's/-/_/g'`
echo "const char CCACHE_VERSION@<:@@:>@ = \"$version\";" >version.c
mkdir -p .deps
diff --git a/dev.mk.in b/dev.mk.in
index 37763a3f..7c936aec 100644
--- a/dev.mk.in
+++ b/dev.mk.in
@@ -8,7 +8,7 @@ XSLTPROC = xsltproc
MANPAGE_XSL = /etc/asciidoc/docbook-xsl/manpage.xsl
version := \
- $(shell (git describe --dirty 2>/dev/null || echo vunknown) | cut -b 2-)
+ $(shell (git describe --dirty 2>/dev/null || echo vunknown) | sed -e 's/v//' -e 's/-/+/' -e 's/-/_/g')
dist_dir = ccache-$(version)
dist_archive_tar_bz2 = ccache-$(version).tar.bz2