tokkee.org
Code
projects
/
template.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
5b9c1712bb9e6797e2e90de75d4d740c2cf373f5
[template.git]
/
version-gen.sh
1
#! /bin/sh
2
3
DEFAULT_VERSION="0.0.0"
4
5
VERSION="$( git describe 2> /dev/null | sed -e 's/foobar-//' )"
6
7
if test -z "$VERSION"; then
8
VERSION="$DEFAULT_VERSION"
9
fi
10
11
VERSION="$( echo "$VERSION" | sed -e 's/-/./g' )"
12
echo -n "$VERSION"
13