From 179ab5a505c7060e2703015961173ee900eed780 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 1 Dec 2013 17:27:25 -0500 Subject: add infrastructure to record and report the version of libc.so this is still experimental and subject to change. for git checkouts, an attempt is made to record the exact revision to aid in bug reports and debugging. no version information is recorded in the static libc.a or binaries it's linked into. --- tools/version.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tools/version.sh (limited to 'tools') diff --git a/tools/version.sh b/tools/version.sh new file mode 100644 index 00000000..f1cc5948 --- /dev/null +++ b/tools/version.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +if test -d .git ; then +if type git >/dev/null 2>&1 ; then +git describe --tags --match 'v[0-9]*' 2>/dev/null \ +| sed -e 's/^v//' -e 's/-/-git-/' +else +sed 's/$/-git/' < VERSION +fi +else +cat VERSION +fi -- cgit v1.2.3-70-g09d2