blob: 91730b81cb5c4ff2c587ac8d7a0a61782467a2ea (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 | #!/bin/bash
# Check for git and a git repo.
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
	echo -n `git describe`
	# Are there uncommitted changes?
	git update-index --refresh --unmerged > /dev/null
	git diff-index --quiet HEAD || echo -n -dirty
else
# Check for version tag
	if [ -e version.tag ]; then
		echo -n `cat version.tag`
	fi
fi
echo
 |