1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00
freebsd/contrib/dma/get-version.sh
2021-09-22 11:10:58 +02:00

12 lines
177 B
Bash

#!/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"