This repository has been archived on 2025-02-12. You can view files and clone it, but cannot push or open issues or pull requests.
NeoStats/include/version.sh

40 lines
705 B
Bash
Raw Normal View History

2004-02-20 20:58:15 +00:00
# Script to generate SVN version information
2005-08-08 03:47:12 +00:00
id=`svn info ..|grep 'Revision:'`
2004-02-20 20:58:15 +00:00
id=`echo $id |sed 's/.* Revision: \(.*\) .* Exp .*/\1/'`
2007-01-10 15:52:45 +00:00
if [ x"$PULSE_BUILD_REVISION" != "x" ]
then
id=$PULSE_BUILD_REVISION
fi
2004-02-20 20:58:15 +00:00
if test -r version.h
then
idold=`sed -n 's/^#define NEOSTATS_REVISION \"\(.*\)\"/\1/p' < version.h`
if [ "$idold" = "$id" ]
then
echo "Not Updating version.h" >&2
2004-02-20 20:58:15 +00:00
else
echo "Updating version.h..." >&2
2004-02-20 20:58:15 +00:00
cat >version.h <<EOF
/*
* This file is generated by version.sh. DO NOT EDIT.
*/
#define NEOSTATS_REVISION "$id"
EOF
fi
else
echo "Creating version.h..."
cat >version.h <<EOF
/*
* This file is generated by version.sh. DO NOT EDIT.
*/
#define NEOSTATS_REVISION "$id"
EOF
fi