freebsd-skq/contrib/dma/get-version.sh
2015-10-10 23:31:47 +00:00

12 lines
177 B
Bash
Executable File

#!/bin/sh
tmp=$1
file=${tmp:=VERSION}
gitver=$(git describe 2>/dev/null | tr - .)
filever=$(cat ${file} 2>/dev/null)
version=${gitver}
: ${version:=$filever}
echo "$version"