chiark / gitweb /
cgi.py, operation.py, list.fhtml: Request-level policy switch.
[chopwood] / get-version
CommitLineData
a2916c06
MW
1#! /bin/sh -e
2
3if [ -d .git ] && version=$(git describe --abbrev=4 2>/dev/null); then
4 case "$(git diff-index --name-only HEAD)" in ?*) version=$version+ ;; esac
5elif [ -f RELEASE ]; then
6 version=$(cat RELEASE)
7else
8 version=UNKNOWN-VERSION
9fi
10echo "$version"