Permalink
Browse files

get-version: trivial improvements

Signed-off-by: Felipe Contreras <felipe.contreras@nokia.com>
  • Loading branch information...
1 parent 2c49844 commit 234363cbdb6c56655b34afcad0ee3a450edd5b77 Felipe Contreras committed with Sep 16, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 get-version
View
7 get-version
@@ -1,11 +1,12 @@
#!/bin/sh
-if test -f .version
-then
+if test -f .version; then
v=`cat .version`
else
- v=`git describe --tags`
+ v=`git describe --tags 2> /dev/null`
fi
+test -z "$v" && v="unknown"
+
# remove initial 'v'
echo "$v" | sed 's/^v//'

0 comments on commit 234363c

Please sign in to comment.