claws-mail/get-git-version
Ricardo Mones d47f31be54 Modernize configure.ac
And move computing git version to an external script.
2022-09-23 17:17:41 +02:00

18 lines
439 B
Bash
Executable file

#!/bin/sh
if test \( -d .git \); then
git=`which git`
if test \( -x "$git" \); then
version=`git describe --abbrev=6 --dirty --always`
echo "echo $version" > ./version
else
echo "Error: *** git not found. See http://git-scm.com/"
exit 1
fi
elif test \( -s ./version \); then
version=`sh -c ". ./version"`
else
echo "Error: *** invalid tree. Neither '.git' nor 'version' were found"
exit 1
fi
echo -n $version