limine/version.sh
2022-02-10 14:47:38 +01:00

8 lines
264 B
Bash
Executable File

#! /bin/sh
LC_ALL=C
export LC_ALL
[ -f version ] || ( git describe --exact-match --tags $(git log -n1 --pretty='%h') 2>/dev/null || git log -n1 --pretty='%h' ) | sed 's/^v//g' | xargs printf '%s'
[ -f version ] && ( cat version 2>/dev/null ) | xargs printf '%s'