diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-04-14 15:17:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:14 -0500 |
commit | 2326c9e0a239de6997a40d8d28c39b9aea965feb (patch) | |
tree | eaf37589ebba1f40791e350e2edb3c1c43333455 /source/script/mkversion.sh | |
parent | 4d9d8e83aa367fe17a74b81d4417cc2cfbdf200e (diff) | |
download | samba-2326c9e0a239de6997a40d8d28c39b9aea965feb.tar.gz samba-2326c9e0a239de6997a40d8d28c39b9aea965feb.tar.xz samba-2326c9e0a239de6997a40d8d28c39b9aea965feb.zip |
r215: merge over svk fixes from 4_0
metze
Diffstat (limited to 'source/script/mkversion.sh')
-rwxr-xr-x | source/script/mkversion.sh | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source/script/mkversion.sh b/source/script/mkversion.sh index f3d385e27ef..f66e1cc1acc 100755 --- a/source/script/mkversion.sh +++ b/source/script/mkversion.sh @@ -51,15 +51,23 @@ fi if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then - TMP_SVN_REVISION=`(svn info ${SOURCE_DIR} 2>/dev/null || svk info ${SOURCE_DIR} 2>/dev/null) |grep Revision: |sed -e 's/Revision: \([0-9]*\).*/\1/'` - TMP_SVN_REVISION_STR="" - if test -n "${TMP_SVN_REVISION}";then - TMP_SVN_REVISION_STR="-${TMP_SVN_REVISION}" + HAVESVN=no + svn info ${SOURCE_DIR} >/dev/null 2>&1 && HAVESVN=yes + TMP_REVISION=`(svn info ${SOURCE_DIR} 2>/dev/null || svk info ${SOURCE_DIR} 2>/dev/null) |grep Revision: |sed -e 's/Revision: \([0-9]*\).*/\1/'` + if test x"${HAVESVN}" = x"no";then + HAVESVK=no + svk info ${SOURCE_DIR} >/dev/null 2>&1 && HAVESVK=yes + TMP_SVK_REVISION_STR="${TMP_REVISION}-${USER}@${HOSTNAME}" + fi + + if test x"${HAVESVN}" = x"yes";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVN-build-${TMP_REVISION}" + echo "#define SAMBA_VERSION_SVN_REVISION ${TMP_REVISION}" >> $OUTPUT_FILE + elif test x"${HAVESVK}" = x"yes";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVK-build-${TMP_SVK_REVISION_STR}" else - TMP_SVN_REVISION=0 + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVN-build-UNKNOWN" fi - SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVN-build${TMP_SVN_REVISION_STR}" - echo "#define SAMBA_VERSION_SVN_REVISION ${TMP_SVN_REVISION}" >> $OUTPUT_FILE fi if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then |