summaryrefslogtreecommitdiffstats
path: root/source/script
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-01-24 03:54:33 +0000
committerGerald Carter <jerry@samba.org>2006-01-24 03:54:33 +0000
commit4b9ea8812ef3f7612c41bf3aaab1371c981279cc (patch)
tree12df5cd6251aa0dbeb06f309ccf25b3096a08a14 /source/script
parent6de6cd120873b7879ec314299de1bcd5bf82c73d (diff)
downloadsamba-4b9ea8812ef3f7612c41bf3aaab1371c981279cc.tar.gz
samba-4b9ea8812ef3f7612c41bf3aaab1371c981279cc.tar.xz
samba-4b9ea8812ef3f7612c41bf3aaab1371c981279cc.zip
r13105: pulling some code over for the 3.0.21b release....first take at it
Diffstat (limited to 'source/script')
-rwxr-xr-xsource/script/mkversion.sh33
-rw-r--r--source/script/tests/functions4
-rw-r--r--source/script/tests/runtests.sh6
3 files changed, 28 insertions, 15 deletions
diff --git a/source/script/mkversion.sh b/source/script/mkversion.sh
index 9d919cfe34b..1ba7cd63699 100755
--- a/source/script/mkversion.sh
+++ b/source/script/mkversion.sh
@@ -1,5 +1,4 @@
#!/bin/sh
-#
VERSION_FILE=$1
OUTPUT_FILE=$2
@@ -17,16 +16,12 @@ SOURCE_DIR=$3
SAMBA_VERSION_MAJOR=`sed -n 's/^SAMBA_VERSION_MAJOR=//p' $SOURCE_DIR$VERSION_FILE`
SAMBA_VERSION_MINOR=`sed -n 's/^SAMBA_VERSION_MINOR=//p' $SOURCE_DIR$VERSION_FILE`
SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
-
SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' $SOURCE_DIR$VERSION_FILE`
-
SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
-
SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE`
-
SAMBA_VERSION_IS_SVN_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_SVN_SNAPSHOT=//p' $SOURCE_DIR$VERSION_FILE`
-
SAMBA_VERSION_VENDOR_SUFFIX=`sed -n 's/^SAMBA_VERSION_VENDOR_SUFFIX=//p' $SOURCE_DIR$VERSION_FILE`
+SAMBA_VENDOR_PATCH=`sed -n 's/^SAMBA_VENDOR_PATCH=//p' $SOURCE_DIR$VERSION_FILE`
echo "/* Autogenerated by script/mkversion.sh */" > $OUTPUT_FILE
@@ -35,13 +30,21 @@ echo "#define SAMBA_VERSION_MINOR ${SAMBA_VERSION_MINOR}" >> $OUTPUT_FILE
echo "#define SAMBA_VERSION_RELEASE ${SAMBA_VERSION_RELEASE}" >> $OUTPUT_FILE
+##
+## start with "3.0.22"
+##
SAMBA_VERSION_STRING="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.${SAMBA_VERSION_RELEASE}"
+##
+## maybe add "3.0.22a" or "3.0.22pre1" or "3.0.22rc1"
+## We do not do pre or rc version on patch/letter releases
+##
if test -n "${SAMBA_VERSION_REVISION}";then
SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}${SAMBA_VERSION_REVISION}"
echo "#define SAMBA_VERSION_REVISION \"${SAMBA_VERSION_REVISION}\"" >> $OUTPUT_FILE
elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then
+ ## maybe add "3.0.22pre2"
SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}"
echo "#define SAMBA_VERSION_PRE_RELEASE ${SAMBA_VERSION_PRE_RELEASE}" >> $OUTPUT_FILE
elif test -n "${SAMBA_VERSION_RC_RELEASE}";then
@@ -49,7 +52,21 @@ elif test -n "${SAMBA_VERSION_RC_RELEASE}";then
echo "#define SAMBA_VERSION_RC_RELEASE ${SAMBA_VERSION_RC_RELEASE}" >> $OUTPUT_FILE
fi
+##
+## Add the vendor string if present
+##
+if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then
+ echo "#define SAMBA_VERSION_VENDOR_SUFFIX ${SAMBA_VERSION_VENDOR_SUFFIX}" >> $OUTPUT_FILE
+ if test -n "${SAMBA_VENDOR_PATCH}";then
+ echo "#define SAMBA_VENDOR_PATCH ${SAMBA_VENDOR_PATCH}" >> $OUTPUT_FILE
+ fi
+fi
+
+
+##
+## SVN revision number?
+##
if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then
_SAVE_LANG=${LANG}
LANG=""
@@ -78,10 +95,6 @@ if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then
LANG=${_SAVE_LANG}
fi
-if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then
- echo "#define SAMBA_VERSION_VENDOR_SUFFIX ${SAMBA_VERSION_VENDOR_SUFFIX}" >> $OUTPUT_FILE
-fi
-
echo "#define SAMBA_VERSION_OFFICIAL_STRING \"${SAMBA_VERSION_STRING}\"" >> $OUTPUT_FILE
echo "#define SAMBA_VERSION_STRING samba_version_string()" >> $OUTPUT_FILE
diff --git a/source/script/tests/functions b/source/script/tests/functions
index 40e185e153f..8cb8f0b1550 100644
--- a/source/script/tests/functions
+++ b/source/script/tests/functions
@@ -34,7 +34,7 @@ stop_smbd()
## check to see if smbd is already running
check_smbd_running
- if test $? == 0; then
+ if test $? = 0; then
echo "Unable to stop smbd!"
exit 2
fi
@@ -74,7 +74,7 @@ stop_nmbd()
## check to see if smbd is already running
kill -0 $nmbd_pid 2> /dev/null
- if test $? == 0; then
+ if test $? = 0; then
echo "Unable to stop nmbd!"
exit 2
fi
diff --git a/source/script/tests/runtests.sh b/source/script/tests/runtests.sh
index a5dc3ecfb4a..ddaf94e8ac5 100644
--- a/source/script/tests/runtests.sh
+++ b/source/script/tests/runtests.sh
@@ -1,11 +1,11 @@
#!/bin/sh
-if [ "x$1" == "x" ]; then
+if [ "x$1" = "x" ]; then
echo "$0 <directory>"
exit 1
fi
-if [ $# == 2 ]; then
+if [ $# = 2 ]; then
testnum=$2
fi
@@ -49,7 +49,7 @@ export USERNAME PASSWORD
## verify that we were built with --enable-socket-wrapper
##
-if test "x`smbd -b | grep SOCKET_WRAPPER`" == "x"; then
+if test "x`smbd -b | grep SOCKET_WRAPPER`" = "x"; then
echo "***"
echo "*** You must include --enable-socket-wrapper when compiling Samba"
echo "*** in order to execute 'make test'. Exiting...."