xref: /aosp_15_r20/external/musl/tools/version.sh (revision c9945492fdd68bbe62686c5b452b4dc1be3f8453)
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