1#!/bin/sh 2 3if test -d .git ; then 4if type git >/dev/null 2>&1 ; then 5git describe --tags --match 'v[0-9]*' 2>/dev/null \ 6| sed -e 's/^v//' -e 's/-/-git-/' 7else 8sed 's/$/-git/' < VERSION 9fi 10else 11cat VERSION 12fi 13