Discussion:
[Linuxwacom-devel] [PATCH input-wacom] Have git-version-gen produce better default output
Jason Gerecke
2016-05-03 22:46:02 UTC
Permalink
Instead of producing "UNKNOWN" as its output when the real version
is not known, have git-version-gen produce the name of the directory
that the input-wacom sources are contained in. In some circumstances
(e.g. building from an archive generated by github) this can result
in useful information being added to the version string to help us
figure out exactly what is installed.

Signed-off-by: Jason Gerecke <***@wacom.com>
---
git-version-gen | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/git-version-gen b/git-version-gen
index d7eed0a..0f4b6cb 100755
--- a/git-version-gen
+++ b/git-version-gen
@@ -1,6 +1,7 @@
#!/bin/sh

-DEF_VER=UNKNOWN
+DIRECTORY=$(basename "$(dirname "$(readlink -mn "$0")")")
+DEF_VER="$DIRECTORY"
TAG_PREFIX="input-wacom-"
LF='
'
--
2.8.2
Loading...