chiark
/
gitweb
/
~mdw
/
chopwood
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
.gitignore: Ignore the `.pyo' files left by `python -O'.
[chopwood]
/
get-version
1
#! /bin/sh -e
2
3
if [ -d .git ] && version=$(git describe --abbrev=4 2>/dev/null); then
4
case "$(git diff-index --name-only HEAD)" in ?*) version=$version+ ;; esac
5
elif [ -f RELEASE ]; then
6
version=$(cat RELEASE)
7
else
8
version=UNKNOWN-VERSION
9
fi
10
echo "$version"