* Updated the wording of the output of a DOWN command ued to restart the server.
[citadel.git] / citadel / mk_svn_revision.sh
blob46de27e2f3cc6ba1716c07b1e7079db9f836bc60
1 #!/bin/sh
3 # Script to generate svn_revision.c
6 ECHO=/usr/bin/printf
9 CUR_DIR=`pwd`
10 C_FILE="$CUR_DIR/svn_revision.c"
11 H_FILE="$CUR_DIR/svn_revision.h"
14 # determine if this code base came from subversion.
15 if test -d .svn ; then
16 echo "have subversion repository"
17 SVNVERSION=`which svnversion`
18 if test -x $SVNVERSION ; then
19 echo "have svnversion at $SVNVERSION"
20 BUILD=`svnversion -n .`
21 echo "This code base revision $BUILD"
22 CAN_BUILD_SVN_REVISION="yes"
26 if [ "$CAN_BUILD_SVN_REVISION" = "yes" ] ; then
28 cat <<EOF > $C_FILE
30 * Subversion revision functions
32 * Autogenerated at make/release time
34 * Do not modify this file
38 const char *svn_revision (void)
40 const char *SVN_Version = "$BUILD";
41 return SVN_Version;
43 EOF
45 elif test ! -f $C_FILE ; then
47 cat <<EOF > $C_FILE
49 * Subversion revision functions
51 * Autogenerated at make time
53 * There should have been one with your source distribution
55 * Do not modify this file
59 const char *svn_revision (void)
61 const char *SVN_Version = "**UNKNOWN** Built from source without svn and no $C_FILE accompanying";
62 return SVN_Version;
64 EOF