d103fe00d7
*add* make_relase.sh convenience script which creates a tarball for release (usage: ./make_release.sh RELEASE_VERSION) *fix* get_svnrev.sh fixed is the fallback version is produced git-svn-id: http://tint2.googlecode.com/svn/trunk@494 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
28 lines
438 B
Bash
Executable file
28 lines
438 B
Bash
Executable file
#!/bin/bash
|
|
|
|
FALLBACK=\"0.10-svn\"
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
DIR=.
|
|
else
|
|
DIR=$1
|
|
fi
|
|
|
|
if [[ -f version.h ]]; then
|
|
REV_OLD=$(cat version.h | cut -d" " -f3)
|
|
else
|
|
REV_OLD=""
|
|
fi
|
|
|
|
if [[ -x "$(which svnversion 2>/dev/null)" && -d "${DIR}/.svn" ]] ; then
|
|
REV=\"$(svnversion -n ${DIR})\"
|
|
else
|
|
REV=${FALLBACK}
|
|
fi
|
|
|
|
if [[ ${REV_OLD} != ${REV} ]]; then
|
|
echo "Building new version.h"
|
|
echo "#define VERSION_STRING ${REV}" > version.h
|
|
fi
|
|
|
|
|