nm4 2009/10/30 15:14:04 GMT
Modified files:
exim-doc/doc-txt ChangeLog
exim-src/scripts exim_install
exim-src/src exicyclog.src exinext.src
Log:
Change "expr" to "expr --" in all shell scripts. Fixes: #889
Revision Changes Path
1.585 +3 -0 exim/exim-doc/doc-txt/ChangeLog
1.3 +1 -1 exim/exim-src/scripts/exim_install
1.10 +2 -2 exim/exim-src/src/exicyclog.src
1.4 +5 -5 exim/exim-src/src/exinext.src
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.584
retrieving revision 1.585
diff -u -r1.584 -r1.585
--- ChangeLog 30 Oct 2009 15:08:25 -0000 1.584
+++ ChangeLog 30 Oct 2009 15:14:04 -0000 1.585
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.584 2009/10/30 15:08:25 nm4 Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.585 2009/10/30 15:14:04 nm4 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -139,6 +139,9 @@
NM/31 Bugzilla 896: Dovecot buffer overrun fix
+NM/32 Bugzilla 889: Change all instances of "expr" in shell scripts to "expr --"
+ Unlike the original bugzilla I have changed all shell scripts in src tree
+
Exim version 4.69
-----------------
Index: exim_install
===================================================================
RCS file: /home/cvs/exim/exim-src/scripts/exim_install,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- exim_install 6 Sep 2005 13:18:13 -0000 1.2
+++ exim_install 30 Oct 2009 15:14:04 -0000 1.3
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Cambridge: exim/exim-src/scripts/exim_install,v 1.2 2005/09/06 13:18:13 ph10 Exp $
+# $Cambridge: exim/exim-src/scripts/exim_install,v 1.3 2009/10/30 15:14:04 nm4 Exp $
# Script to install Exim binaries in BIN_DIRECTORY, which is defined in
# the local Makefile. It expects to be run in a build directory. It needs
@@ -378,7 +378,7 @@
echo $com ""
-if [ `expr "${CONFIGURE_FILE}" : ".*:"` -ne 0 ] ; then
+if [ `expr -- "${CONFIGURE_FILE}" : ".*:"` -ne 0 ] ; then
echo $com Runtime configuration is specified as the following list:
echo $com ' ' ${CONFIGURE_FILE}
echo $com Therefore, skipping automatic installation.
Index: exicyclog.src
===================================================================
RCS file: /home/cvs/exim/exim-src/src/exicyclog.src,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- exicyclog.src 20 Jan 2009 16:06:14 -0000 1.9
+++ exicyclog.src 30 Oct 2009 15:14:04 -0000 1.10
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Cambridge: exim/exim-src/src/exicyclog.src,v 1.9 2009/01/20 16:06:14 fanf2 Exp $
+# $Cambridge: exim/exim-src/src/exicyclog.src,v 1.10 2009/10/30 15:14:04 nm4 Exp $
# Copyright (c) 2006 University of Cambridge.
# See the file NOTICE for conditions of use and distribution.
@@ -251,7 +251,7 @@
if [ $count -lt 10 ]; then countt=0$count; else countt=$count; fi
while [ $count -gt 1 ]; do
- old=`expr $count - 1`
+ old=`expr -- $count - 1`
if [ $keep -gt 99 ]; then
if [ $old -lt 10 ]; then oldt=00$old
elif [ $old -lt 100 ]; then oldt=0$old
@@ -334,7 +334,7 @@
$chown $user:$group $paniclog.$countt.$suffix
fi
- count=`expr $count + 1`
+ count=`expr -- $count + 1`
done
# End of exicyclog
Index: exinext.src
===================================================================
RCS file: /home/cvs/exim/exim-src/src/exinext.src,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- exinext.src 29 Jul 2007 21:49:46 -0000 1.3
+++ exinext.src 30 Oct 2009 15:14:04 -0000 1.4
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Cambridge: exim/exim-src/src/exinext.src,v 1.3 2007/07/29 21:49:46 magnus Exp $
+# $Cambridge: exim/exim-src/src/exinext.src,v 1.4 2009/10/30 15:14:04 nm4 Exp $
# Copyright (c) 1996-2004 University of Cambridge.
# See the file NOTICE for conditions of use and distribution.
@@ -26,16 +26,16 @@
eximmacdef=
exim_path=
-if expr $1 : '\-' >/dev/null ; then
- while expr $1 : '\-' >/dev/null ; do
+if expr -- $1 : '\-' >/dev/null ; then
+ while expr -- $1 : '\-' >/dev/null ; do
if [ "$1" = "-C" ]; then
config=$2
shift
shift
- elif expr $1 : '\-D' >/dev/null ; then
+ elif expr -- $1 : '\-D' >/dev/null ; then
eximmacdef="$eximmacdef $1"
- if expr $1 : '\-DEXIM_PATH=' >/dev/null ; then
- exim_path=`expr $1 : '\-DEXIM_PATH=\(.*\)'`
+ if expr -- $1 : '\-DEXIM_PATH=' >/dev/null ; then
+ exim_path=`expr -- $1 : '\-DEXIM_PATH=\(.*\)'`
fi
shift
else