httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject [PATCH] Consistant shell scripting and fixes
Date Sat, 16 Jan 1999 14:28:23 GMT
I thought we were in CTR, but.....

diff -r -u apache-1.3.bak/configure apache-1.3/configure 
--- apache-1.3.bak/configure	Fri Jan 15 17:20:17 1999
+++ apache-1.3/configure	Fri Jan 15 17:58:19 1999
@@ -96,7 +96,7 @@
 ##
 ##  display version information
 ##
-if [ ".$quiet" = .no ]; then
+if [ "x$quiet" = "xno" ]; then
     APV=`cat $src/include/httpd.h |\
          grep "#define SERVER_BASEVERSION" |\
          sed -e 's/^[^"]*"//' -e 's/".*$//' -e 's/^Apache\///'`
@@ -119,7 +119,7 @@
 ##
 PERL=no-perl-on-this-system
 perlpath="`$aux/PrintPath perl5 perl miniperl`"
-if [ "x$perlpath" != x ]; then
+if [ "x$perlpath" != "x" ]; then
     PERL="$perlpath"
 fi
 
@@ -131,9 +131,9 @@
 ##
 SEO='' # CHANGE THIS VARIABLE HERE IF YOU HAVE PROBLEMS WITH ECHO!
 bytes=`echo $SEO '\1' | wc -c | awk '{ printf("%s", $1); }'`
-if [ ".$bytes" != .3 ]; then
+if [ "x$bytes" != "x3" ]; then
     bytes=`echo -E '\1' | wc -c | awk '{ printf("%s", $1); }'`
-    if [ ".$bytes" != .3 ]; then
+    if [ "x$bytes" != "x3" ]; then
         echo " + Warning: Your 'echo' command is slightly broken."
         echo " + It interprets escape sequences per default. We already"
         echo " + tried 'echo -E' but had no real success. If errors occur"
@@ -152,7 +152,7 @@
 ##
 AWK=awk
 awkpath="`$aux/PrintPath nawk gawk awk`"
-if [ "x$awkpath" != x ]; then
+if [ "x$awkpath" != "x" ]; then
     AWK="$awkpath"
 fi
 
@@ -163,7 +163,7 @@
 ##
 TAR=tar
 tarpath="`$aux/PrintPath gtar gnutar tar`"
-if [ "x$awkpath" != x ]; then
+if [ "x$tarpath" != "x" ]; then
     TAR="$tarpath"
 fi
 case "`$TAR --version 2>/dev/null`" in
@@ -245,7 +245,7 @@
     eval "shared_$module=$share"
     modules="${modules}:$module"
     modulelist="${modulelist}:$module=$add"
-    if [ ".$share" = .yes ]; then
+    if [ "x$share" = "xyes" ]; then
         modulelist="${modulelist}*"
     fi
 done
@@ -258,7 +258,7 @@
 OIFS="$IFS" IFS="$DIFS"
 for var in CFLAGS LDFLAGS LIBS INCLUDES DEPS; do
     eval "val=\$EXTRA_$var"
-    if [ "x$val" != x ]; then
+    if [ "x$val" != "x" ]; then
         eval "$var=\$val"
         eval "EXTRA_$var=\"\"; export EXTRA_$var"
         echo " + Hint: please use $var instead of EXTRA_$var next time"
@@ -273,7 +273,7 @@
     *--with-layout=* ) 
         ;;
     * ) 
-        if [ "x$*" = x ]; then
+        if [ "x$*" = "x" ]; then
             set -- '--with-layout=Apache'
         else
             set -- '--with-layout=Apache' "$@"
@@ -293,7 +293,7 @@
 for apc_option
 do
     #   if previous option needs an argument, assign it.
-    if [ "x$apc_prev" != x ]; then
+    if [ "x$apc_prev" != "x" ]; then
         eval "$apc_prev=\$apc_option"
         apc_prev=""
         continue
@@ -408,11 +408,11 @@
             done
             IFS="$OIFS"
             rm -f $pldconf 2>/dev/null
-            if [ ".$prefix" = .UNSET ]; then
+            if [ "x$prefix" = "xUNSET" ]; then
                 echo "configure:Error: Path layout definition not found or incorrect" 1>&2
                 exit 1
             fi
-            if [ ".$quiet" = .no ]; then
+            if [ "x$quiet" = "xno" ]; then
                 echo " + using installation path layout: $name ($file)"
             fi
             with_layout=1
@@ -433,7 +433,7 @@
 for apc_option
 do
     #   if previous option needs an argument, assign it.
-    if [ "x$apc_prev" != x ]; then
+    if [ "x$apc_prev" != "x" ]; then
         eval "$apc_prev=\$apc_option"
         apc_prev=""
         continue
@@ -461,7 +461,7 @@
             case "$apc_option" in
                 --shadow=*)
                     shadow="$apc_optarg"
-                    if [ .$quiet = .no ]; then
+                    if [ "x$quiet" = "xno" ]; then
                         echo " + creating external package shadow tree ($shadow)"
                     fi
                     rm -rf $shadow 2>/dev/null
@@ -469,7 +469,7 @@
                     for file in $mkf $sedsubst $addconf $tplconf $pldconf $configstatus;
do
                         rm -f $shadow/$file 2>/dev/null
                     done
-                    if [ .$quiet = .no ]; then
+                    if [ "x$quiet" = "xno" ]; then
                         echo " + switching to external package shadow tree ($shadow)"
                     fi
                     cd $shadow
@@ -479,14 +479,14 @@
             gnutriple=`$aux/GuessOS | sed -e 's:/:-:g' | $AWK '{ printf("%s",$1); }'`
             #   create Makefile wrapper (the first time only)
             if [ ".`ls $top/src.* 2>/dev/null`" = . ]; then
-                if [ .$quiet = .no ]; then
+                if [ "x$quiet" = "xno" ]; then
                     echo " + creating Makefile (shadow wrapper)"
                 fi
                 echo "##" > Makefile
                 echo "##  Apache Makefile (shadow wrapper)" >> Makefile
                 echo "##" >> Makefile
                 echo "" >> Makefile
-                if [ "x$shadow" != x ]; then
+                if [ "x$shadow" != "x" ]; then
                     echo "SHADOW=$shadow" >> Makefile
                 else
                     echo "SHADOW=." >> Makefile
@@ -505,7 +505,7 @@
             shadowaddconf="src.$gnutriple/.apaci.addconf"
             shadowtplconf="src.$gnutriple/.apaci.tplconf"
             #   (re)create shadow tree
-            if [ .$quiet = .no ]; then
+            if [ "x$quiet" = "xno" ]; then
                 echo " + creating internal platform shadow tree ($shadowsrc)"
             fi
             rm -rf $shadowsrc
@@ -588,10 +588,10 @@
             fi
             modfilec=`echo $file | sed -e 's;^.*/;;'`
             modfileo=`echo $file | sed -e 's;^.*/;;' -e 's;\.c$;.o;'`
-            if [ ".$file" != ".$src/modules/extra/$modfilec" ]; then
+            if [ "x$file" != "x$src/modules/extra/$modfilec" ]; then
                 cp $file $src/modules/extra/$modfilec
             fi
-            if [ ".$addconf_created" = .0 ]; then
+            if [ "x$addconf_created" = "x0" ]; then
                 addconf_created=1
                 rm -f $addconf 2>/dev/null
                 touch $addconf 2>/dev/null
@@ -609,7 +609,7 @@
             eval "shared_$module=no"
             modules="${modules}:$module"
             modulelist="${modulelist}:$module=yes"
-            if [ ".$quiet" = .no ]; then
+            if [ "x$quiet" = "xno" ]; then
                 echo " + on-the-fly added and activated $module module (modules/extra/$modfileo)"
             fi
             ;;
@@ -622,7 +622,7 @@
                     ;;
             esac
             modfile=`echo $file | sed -e 's;^src/;;'`
-            if [ ".$addconf_created" = .0 ]; then
+            if [ "x$addconf_created" = "x0" ]; then
                 addconf_created=1
                 rm -f $addconf 2>/dev/null
                 touch $addconf 2>/dev/null
@@ -640,7 +640,7 @@
             eval "shared_$module=no"
             modules="${modules}:$module"
             modulelist="${modulelist}:$module=yes"
-            if [ ".$quiet" = .no ]; then
+            if [ "x$quiet" = "xno" ]; then
                 echo " + activated $module module ($modfile)"
             fi
             ;;
@@ -656,7 +656,7 @@
                     apc_optarg=`echo "$apc_optarg" | tr "A-Z" "a-z"`
                     apc_optarg_real=`echo "$apc_optarg" | tr "a-z" "A-Z"`
                     eval "exists=\$rule_${apc_optarg}" 
-                    if [ "x$exists" = x ]; then
+                    if [ "x$exists" = "x" ]; then
                         echo "configure:Error: No such rule named '${apc_optarg_real}'" 1>&2
                         exit 1
                     fi
@@ -686,7 +686,7 @@
                            ;;
                        * ) 
                            eval "exists=\$module_${apc_optarg}" 
-                           if [ "x$exists" = x ]; then
+                           if [ "x$exists" = "x" ]; then
                                echo "configure:Error: No such module named '${apc_optarg}'"
1>&2
                                exit 1
                            fi
@@ -708,7 +708,7 @@
                            OIFS="$IFS" IFS=':'
                            for module in $modules; do
                                eval "add=\$module_${module}" 
-                               if [ ".$add" = .no ]; then
+                               if [ "x$add" = "xno" ]; then
                                    eval "module_${module}=yes" 
                                    eval "shared_${module}=yes" 
                                fi
@@ -718,7 +718,7 @@
                            ;;
                        * ) 
                            eval "exists=\$module_${apc_optarg}" 
-                           if [ "x$exists" = x ]; then
+                           if [ "x$exists" = "x" ]; then
                                echo "configure:Error: No such module named '${apc_optarg}'"
1>&2
                                exit 1
                            fi
@@ -743,7 +743,7 @@
                     apc_optarg=`echo "$apc_optarg" | tr "A-Z" "a-z"`
                     apc_optarg_real=`echo "$apc_optarg" | tr "a-z" "A-Z"`
                     eval "exists=\$rule_${apc_optarg}" 
-                    if [ "x$exists" = x ]; then
+                    if [ "x$exists" = "x" ]; then
                         echo "configure:Error: No such rule named '${apc_optarg_real}'" 1>&2
                         exit 1
                     fi
@@ -760,7 +760,7 @@
                            ;;
                        * ) 
                            eval "exists=\$module_${apc_optarg}" 
-                           if [ "x$exists" = x ]; then
+                           if [ "x$exists" = "x" ]; then
                                echo "configure:Error: No such module named '${apc_optarg}'"
1>&2
                                exit 1
                            fi
@@ -779,7 +779,7 @@
                            ;;
                        * ) 
                            eval "exists=\$module_${apc_optarg}" 
-                           if [ "x$exists" = x ]; then
+                           if [ "x$exists" = "x" ]; then
                                echo "configure:Error: No such module named '${apc_optarg}'"
1>&2
                                exit 1
                            fi
@@ -797,7 +797,7 @@
                     BEGIN|END)
                         ;;
                     *)  eval "exists=\$module_${mod}" 
-                        if [ "x$exists" = x ]; then
+                        if [ "x$exists" = "x" ]; then
                             echo "configure:Error: No such module named '${mod}'" 1>&2
                             exit 1
                         fi
@@ -856,11 +856,11 @@
     esac
 done
 IFS="$OIFS1"
-if [ "x$apc_prev" != x ]; then
+if [ "x$apc_prev" != "x" ]; then
     echo "configure:Error: missing argument to --`echo $apc_prev | sed 's/_/-/g'`" 1>&2
     exit 1
 fi
-if [ ".$addconf_created" = .0 ]; then
+if [ "x$addconf_created" = "x0" ]; then
     rm -f $addconf 2>/dev/null
     touch $addconf 2>/dev/null
 fi
@@ -881,7 +881,7 @@
 for var in CC CPP OPTIM CFLAGS CFLAGS_SHLIB LDFLAGS LD_SHLIB LDFLAGS_SHLIB \
            LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB DEPS TARGET; do
     eval "val=\"\$$var\""
-    if [ "x$val" != x ]; then
+    if [ "x$val" != "x" ]; then
         echo "$var=$val" |\
         sed -e 's:\(["$\\]\):\\\1:g' \
             -e 's:\([A-Z]*=\):\1":' \
@@ -903,8 +903,8 @@
 ##
 ##  a few errors and warnings
 ##
-if [ ".$suexec" = .1 ]; then
-    if [ ".$suexec_ok" = .0 ]; then
+if [ "x$suexec" = "x1" ]; then
+    if [ "x$suexec_ok" = "x0" ]; then
         echo "configure:Error: You enabled the suEXEC feature via --enable-suexec but"
         echo "                 without explicitly configuring it via at least one"
         echo "                 --suexec-xxxxx option. Seems like you are still not"
@@ -917,8 +917,8 @@
         echo " + root privileges for this, at the latest at the installation step." 1>&2
     fi
 fi
-if [ ".$PERL" = .no-perl-on-this-system ]; then
-    if [ .$quiet = .no ]; then
+if [ "x$PERL" = "xno-perl-on-this-system" ]; then
+    if [ "x$quiet" = "xno" ]; then
         echo " + Warning: no Perl interpreter available for support scripts."
         echo " + Perhaps you have to select one with --with-perl=FILE."
     fi
@@ -927,7 +927,7 @@
 ##
 ##  target name
 ##
-if [ "x$TARGET" != x ]; then
+if [ "x$TARGET" != "x" ]; then
     thetarget=$TARGET
 else
     thetarget=httpd
@@ -949,7 +949,7 @@
     #   add target suffix when requested
     if [ ".`echo $val | grep $thetarget`" = . ]; then
         eval "autosuffix=\$autosuffix_$var"
-        if [ ".$autosuffix" = .yes ]; then
+        if [ "x$autosuffix" = "xyes" ]; then
             eval "$var=\"\$$var/$thetarget\""
         fi
     fi
@@ -959,7 +959,7 @@
 ##
 ##  determine special configurable Makefile targets
 ##
-if [ ".$support" = .1 ]; then
+if [ "x$support" = "x1" ]; then
     build_support='build-support'
     install_support='install-support'
     clean_support='clean-support'
@@ -978,7 +978,7 @@
 conf_port="80"
 conf_serveradmin="you@your.address"
 conf_servername="new.host.name"
-if [ ".$confadjust" = .1 ]; then
+if [ "x$confadjust" = "x1" ]; then
     if [ ".`egrep '^nobody:' /etc/group`" != . ]; then
         conf_group="nobody"
     else
@@ -1010,7 +1010,7 @@
 ##
 ##  check and debug
 ##
-if [ ".$show_layout" = .1 ]; then
+if [ "x$show_layout" = "x1" ]; then
     echo ""
     echo "Installation paths:"
     echo "               prefix: $prefix"
@@ -1040,7 +1040,7 @@
     echo "   ACCESS_CONFIG_FILE: ${sysconfdir_relative}access.conf"
     echo " RESOURCE_CONFIG_FILE: ${sysconfdir_relative}srm.conf"
     echo ""
-    if [ ".$suexec" = .1 ]; then
+    if [ "x$suexec" = "x1" ]; then
         echo "suEXEC setup:"
         echo "        suexec binary: $sbindir/suexec"
         echo "        document root: $suexec_docroot"
@@ -1058,7 +1058,7 @@
 ##
 ##  create Makefile from Makefile.tmpl
 ##
-if [ .$quiet = .no ]; then
+if [ "x$quiet" = "xno" ]; then
     echo "Creating $mkf"
 fi
 sed <Makefile.tmpl >$mkf \
@@ -1126,7 +1126,7 @@
 ##
 ##  create $src/Configuration.apaci file
 ##
-if [ .$quiet = .no ]; then
+if [ "x$quiet" = "xno" ]; then
     echo "Creating Configuration.apaci in $src"
 fi
 rm -f $sedsubst 2>/dev/null
@@ -1137,7 +1137,7 @@
 for var in CC CPP OPTIM CFLAGS CFLAGS_SHLIB LDFLAGS LD_SHLIB LDFLAGS_SHLIB \
            LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB DEPS TARGET; do
     eval "val=\"\$$var\"";
-    if [ "x$val" != x ]; then
+    if [ "x$val" != "x" ]; then
         case $var in 
             CFLAGS|LDFLAGS|LIBS|INCLUDES|DEPS) 
                 echo $SEO "s%^#*\\(EXTRA_$var=\\).*%\\1$val%g" >>$sedsubst
@@ -1157,7 +1157,7 @@
     name="`echo $rule | tr "a-z" "A-Z"`"
     eval "val=\$rule_$rule"
     echo $SEO "s%^\\(Rule $name=\\).*%\\1$val%g" >>$sedsubst
-    if [ $verbose = yes ]; then
+    if [ "x$verbose" = "xyes" ]; then
         echo " + Rule $name=$val"
     fi
 done
@@ -1168,27 +1168,27 @@
 OIFS="$IFS" IFS=':'
 for module in $modules; do
     eval "share=\$shared_$module"
-    if [ $share = yes ]; then
+    if [ "x$share" = "xyes" ]; then
         some_shares=1
     fi
 done
 IFS="$OIFS"
-if [ $some_shares = 1 ]; then
-    if [ $module_so = no ]; then
+if [ "x$some_shares" = "x1" ]; then
+    if [ "x$module_so" = "xno" ]; then
         module_so=yes
-        if [ .$quiet = .no ]; then
+        if [ "x$quiet" = "xno" ]; then
             echo " + enabling mod_so for DSO support"
         fi
     fi
 fi
-if [ ".$shared_so" = .yes ]; then
+if [ "x$shared_so" = "xyes" ]; then
     shared_so=no
     echo "configure:Error: Module mod_so cannot be made a DSO itself" 1>&2
     exit 1
 fi
 
 #   module permutation support
-if [ "x$permute" != x ]; then
+if [ "x$permute" != "x" ]; then
     sed -e '/## mod_mmap_static/,$d' <src/Configuration.tmpl >$tplconf
     OIFS="$IFS" IFS='
 '
@@ -1263,7 +1263,7 @@
 OIFS="$IFS" IFS=':'
 for module in $modules; do
     eval "add=\$module_$module"
-    if [ $add = yes ]; then
+    if [ "x$add" = "xyes" ]; then
         echo $SEO "s%^.*\\(AddModule.*[_b/]$module\\..*\\)%\\1%g" >>$sedsubst
         echo $SEO "s%^.*\\(SharedModule.*[_b/]$module\\..*\\)%\\1%g" >>$sedsubst
         m="yes [static]"
@@ -1273,11 +1273,11 @@
         m=no
     fi
     eval "share=\$shared_$module"
-    if [ $share = yes ]; then
+    if [ "x$share" = "xyes" ]; then
         echo $SEO "s%^\\(.*\\)AddModule\\(.*[_b/]$module\\.\\)[oam].*\\(.*\\)%\\1SharedModule\\2so\\3%g"
>>$sedsubst
         m="yes [shared]"
     fi
-    if [ $verbose = yes ]; then
+    if [ "x$verbose" = "xyes" ]; then
         echo " + Module $module: $m"
     fi
 done
@@ -1318,7 +1318,7 @@
 ##  create all other Makefiles by running the proprietary 
 ##  $src/Configure script with our custom Configuration.apaci file
 ##
-if [ .$quiet = .yes ]; then
+if [ "x$quiet" = "xyes" ]; then
     (cd $src; ./Configure -file Configuration.apaci >/dev/null);
 else
     (cd $src; ./Configure -file Configuration.apaci |\
@@ -1330,8 +1330,8 @@
 ##
 ##  final hints
 ##
-if [ .$quiet = .no ]; then
-    if [ "x$shadow" != x ]; then
+if [ "x$quiet" = "xno" ]; then
+    if [ "x$shadow" != "x" ]; then
         echo "Hint: You now have to build inside $shadow."
         echo "This can be done either by running the canonical commands"
         echo "  \$ cd $shadow"
diff -r -u apache-1.3.bak/src/Configure apache-1.3/src/Configure
--- apache-1.3.bak/src/Configure	Fri Jan 15 17:20:49 1999
+++ apache-1.3/src/Configure	Fri Jan 15 17:58:32 1999
@@ -172,7 +172,7 @@
 ## that the user was using the old default root directory
 ## and issue a notice about it.
 ##
-if [ $file != "Configuration.apaci" ]
+if [ "x$file" != "xConfiguration.apaci" ]
 then
   if [ -d /usr/local/etc/httpd/ ]
   then
diff -r -u apache-1.3.bak/src/helpers/binbuild.sh apache-1.3/src/helpers/binbuild.sh
--- apache-1.3.bak/src/helpers/binbuild.sh	Fri Jan 15 15:48:36 1999
+++ apache-1.3/src/helpers/binbuild.sh	Fri Jan 15 17:58:33 1999
@@ -190,14 +190,14 @@
   echo "ERROR: Failed to build Apache. See \"build.log\" for details."
   exit 1;
 else
-  if [ ".$GTAR" != . ]
+  if [ "x$GTAR" != "x" ]
   then
     $GTAR -zcf ../apache-$VER-$OS.tar.gz -C .. --owner=root --group=root apache-$VER
   else
-    if [ ".$TAR" != . ]
+    if [ "x$TAR" != "x" ]
     then
       $TAR -cf ../apache-$VER-$OS.tar -C .. apache-$VER
-      if [ ".$GZIP" != . ]
+      if [ "x$GZIP" != "x" ]
       then
         $GZIP ../apache-$VER-$OS.tar
       fi
diff -r -u apache-1.3.bak/src/helpers/buildinfo.sh apache-1.3/src/helpers/buildinfo.sh
--- apache-1.3.bak/src/helpers/buildinfo.sh	Fri Jan 15 17:18:54 1999
+++ apache-1.3/src/helpers/buildinfo.sh	Fri Jan 15 17:58:35 1999
@@ -55,15 +55,15 @@
 #   determine username
 #
 username="$LOGNAME"
-if [ ".$username" = . ]; then
+if [ "x$username" = "x" ]; then
     username="$USER"
-    if [ ".$username" = . ]; then
+    if [ "x$username" = "x" ]; then
         username="`whoami 2>/dev/null |\
                    awk '{ printf("%s", $1); }'`"
-        if [ ".$username" = . ]; then
+        if [ "x$username" = "x" ]; then
             username="`who am i 2>/dev/null |\
                        awk '{ printf("%s", $1); }'`"
-            if [ ".$username" = . ]; then
+            if [ "x$username" = "x" ]; then
                 username='unknown'
             fi
         fi
@@ -75,10 +75,10 @@
 #
 hostname="`uname -n 2>/dev/null |\
            awk '{ printf("%s", $1); }'`"
-if [ ".$hostname" = . ]; then
+if [ "x$hostname" = "x" ]; then
     hostname="`hostname 2>/dev/null |\
                awk '{ printf("%s", $1); }'`"
-    if [ ".$hostname" = . ]; then
+    if [ "x$hostname" = "x" ]; then
         hostname='unknown'
     fi
 fi
@@ -88,14 +88,14 @@
         hostname="`echo $hostname | cut -d. -f1`"
         ;;
 esac
-if [ ".$domainname" = . ]; then
+if [ "x$domainname" = "x" ]; then
     if [ -f /etc/resolv.conf ]; then
         domainname="`egrep '^[ 	]*domain' /etc/resolv.conf | head -1 |\
                      sed -e 's/.*domain//' \
                          -e 's/^[ 	]*//' -e 's/^ *//' -e 's/^	*//' \
                          -e 's/^\.//' -e 's/^/./' |\
                      awk '{ printf("%s", $1); }'`"
-        if [ ".$domainname" = . ]; then
+        if [ "x$domainname" = "x" ]; then
             domainname="`egrep '^[ 	]*search' /etc/resolv.conf | head -1 |\
                          sed -e 's/.*search//' \
                              -e 's/^[ 	]*//' -e 's/^ *//' -e 's/^	*//' \
@@ -112,7 +112,7 @@
 time_day="`date '+%d' | awk '{ printf("%s", $1); }'`"
 time_month="`date '+%m' | awk '{ printf("%s", $1); }'`"
 time_year="`date '+%Y' 2>/dev/null | awk '{ printf("%s", $1); }'`"
-if test ".$time_year" = .; then
+if [ "x$time_year" = "x" ]; then
     time_year="`date '+%y' | awk '{ printf("%s", $1); }'`"
     case $time_year in
         9[0-9]*) time_year="19$time_year" ;;
@@ -137,7 +137,7 @@
 #
 #   create result string
 #
-if [ ".$newline" = .yes ]; then
+if [ "x$newline" = "xyes" ]; then
     echo $format_string |\
     sed -e "s;%u;$username;g" \
         -e "s;%h;$hostname;g" \
diff -r -u apache-1.3.bak/src/helpers/checkheader.sh apache-1.3/src/helpers/checkheader.sh
--- apache-1.3.bak/src/helpers/checkheader.sh	Fri Jan 15 15:51:07 1999
+++ apache-1.3/src/helpers/checkheader.sh	Fri Jan 15 17:58:35 1999
@@ -10,10 +10,10 @@
 
 header=$1
 rc=1
-if [ ".$CPP" = . ]; then
+if [ "x$CPP" = "x" ]; then
     CPP='NOT-AVAILABLE'
 fi
-if [ ".$CPP" != ".NOT-AVAILABLE" ]; then
+if [ "x$CPP" != "xNOT-AVAILABLE" ]; then
     #   create a test C source
     cat >conftest.c <<EOF
 #include <$header>
@@ -21,7 +21,7 @@
 EOF
     (eval "$CPP conftest.c >/dev/null") 2>conftest.out
     my_error=`grep -v '^ *+' conftest.out`
-    if [ ".$my_error" = . ]; then
+    if [ "x$my_error" = "x" ]; then
         rc=0
     fi
 else
diff -r -u apache-1.3.bak/src/helpers/findcpp.sh apache-1.3/src/helpers/findcpp.sh
--- apache-1.3.bak/src/helpers/findcpp.sh	Fri Jan 15 15:51:57 1999
+++ apache-1.3/src/helpers/findcpp.sh	Fri Jan 15 17:58:37 1999
@@ -19,16 +19,16 @@
 EOF
 
 #   some braindead systems have a CPP define for a directory :-(
-if [ ".$CPP" != . ]; then
+if [ "x$CPP" != "x" ]; then
     if [ -d "$CPP" ]; then
         CPP=''
     fi
 fi
-if [ ".$CPP" != . ]; then
+if [ "x$CPP" != "x" ]; then
     #   case 1: user provided a default CPP variable (we only check)
     (eval "$CPP conftest.c >/dev/null") 2>conftest.out
     my_error=`grep -v '^ *+' conftest.out`
-    if [ ".$my_error" != . ]; then
+    if [ "x$my_error" != "x" ]; then
         CPP=''
     fi
 else
@@ -37,21 +37,21 @@
     CPP="${CC-cc} -E"
     (eval "$CPP conftest.c >/dev/null") 2>conftest.out
     my_error=`grep -v '^ *+' conftest.out`
-    if [ ".$my_error" != . ]; then
+    if [ "x$my_error" != "x" ]; then
         #   2. try the -E option and GCC's -traditional-ccp option
         CPP="${CC-cc} -E -traditional-cpp"
         (eval "$CPP conftest.c >/dev/null") 2>conftest.out
         my_error=`grep -v '^ *+' conftest.out`
-        if [ ".$my_error" != . ]; then
+        if [ "x$my_error" != "x" ]; then
             #   3. try a standalone cpp command in $PATH and lib dirs
             CPP="`./helpers/PrintPath cpp`"
-            if [ ".$CPP" = . ]; then
+            if [ "x$CPP" = "x" ]; then
                 CPP="`./helpers/PrintPath -p/lib:/usr/lib:/usr/local/lib cpp`"
             fi
-            if [ ".$CPP" != . ]; then
+            if [ "x$CPP" != "x" ]; then
                 (eval "$CPP conftest.c >/dev/null") 2>conftest.out
                 my_error=`grep -v '^ *+' conftest.out`
-                if [ ".$my_error" != . ]; then
+                if [ "x$my_error" != "x" ]; then
                     #   ok, we gave up...
                     CPP=''
                 fi
@@ -64,7 +64,7 @@
 rm -f conftest.*
 
 #   Ok, empty CPP variable now means it's not available
-if [ ".$CPP" = . ]; then
+if [ "x$CPP" = "x" ]; then
     CPP='NOT-AVAILABLE'
 fi
 
diff -r -u apache-1.3.bak/src/helpers/fmn.sh apache-1.3/src/helpers/fmn.sh
--- apache-1.3.bak/src/helpers/fmn.sh	Fri Jan 15 15:46:58 1999
+++ apache-1.3/src/helpers/fmn.sh	Fri Jan 15 17:58:37 1999
@@ -20,9 +20,9 @@
 modname=''
 ext=`echo $modfile | sed 's/^.*\.//'`
 modbase=`echo $modfile | sed 's/\.[^.]*$//'`
-if [ x$ext = x$modfile ]; then ext=o; modbase=$modfile; modfile=$modbase.o; fi
-if [ x$ext = x ] ; then ext=o; modbase=$modfile; fi
-if [ x$ext = xc ] ; then ext=o; fi
+if [ "x$ext" = "x$modfile" ]; then ext=o; modbase=$modfile; modfile=$modbase.o; fi
+if [ "x$ext" = "x" ] ; then ext=o; modbase=$modfile; fi
+if [ "x$ext" = "xc" ] ; then ext=o; fi
 if [ -r $modbase.module ] ; then
     cat $modbase.module >$tmpfile
 else
@@ -39,7 +39,7 @@
 if [ -r $tmpfile ] ; then
     modname=`grep "Name:" $tmpfile | sed 's/^.*Name:[ 	]*//'`
 fi
-if [ "x$modname" = "x" ] ; then
+if [ "x$modname" = "x" ] ; then
     modname=`echo $modbase | sed 's/^.*\///' | \
         sed 's/^mod_//' | sed 's/^lib//' | sed 's/$/_module/'`
 fi
diff -r -u apache-1.3.bak/src/helpers/fp2rp apache-1.3/src/helpers/fp2rp
--- apache-1.3.bak/src/helpers/fp2rp	Fri Jan 15 15:47:31 1999
+++ apache-1.3/src/helpers/fp2rp	Fri Jan 15 17:58:37 1999
@@ -2,7 +2,7 @@
 ##
 ## fp2rp -- convert a standard forward path to a reverse dotted path
 ##
-if [ "x$1" = x. ]; then
+if [ "x$1" = "x." ]; then
     rp="."
 else
     rp=""
diff -r -u apache-1.3.bak/src/helpers/install.sh apache-1.3/src/helpers/install.sh
--- apache-1.3.bak/src/helpers/install.sh	Fri Jan 15 15:52:43 1999
+++ apache-1.3/src/helpers/install.sh	Fri Jan 15 17:58:39 1999
@@ -36,7 +36,7 @@
 mvcmd="$mvprog"
 src=""
 dst=""
-while [ ".$1" != . ]; do
+while [ "x$1" != "x" ]; do
     case $1 in
         -c) instcmd="$cpprog"
             shift; continue
@@ -52,7 +52,7 @@
             ;;
         -s) stripcmd="$stripprog"
             shift; continue;;
-        *)  if [ ".$src" = . ]; then
+        *)  if [ "x$src" = "x" ]; then
                 src=$1
             else
                 dst=$1
@@ -61,11 +61,11 @@
             ;;
     esac
 done
-if [ ".$src" = . ]; then
+if [ "x$src" = "x" ]; then
      echo "install.sh: no input file specified"
      exit 1
 fi
-if [ ".$dst" = . ]; then
+if [ "x$dst" = "x" ]; then
      echo "install.sh: no destination specified"
      exit 1
 fi
@@ -87,10 +87,10 @@
 $instcmd $src $dsttmp
 
 #  And set any options; do chmod last to preserve setuid bits
-if [ ".$chowncmd" != . ]; then $chowncmd $dsttmp; fi
-if [ ".$chgrpcmd" != . ]; then $chgrpcmd $dsttmp; fi
-if [ ".$stripcmd" != . ]; then $stripcmd $dsttmp; fi
-if [ ".$chmodcmd" != . ]; then $chmodcmd $dsttmp; fi
+if [ "x$chowncmd" != "x" ]; then $chowncmd $dsttmp; fi
+if [ "x$chgrpcmd" != "x" ]; then $chgrpcmd $dsttmp; fi
+if [ "x$stripcmd" != "x" ]; then $stripcmd $dsttmp; fi
+if [ "x$chmodcmd" != "x" ]; then $chmodcmd $dsttmp; fi
 
 #  Now rename the file to the real destination.
 $rmcmd $dst
diff -r -u apache-1.3.bak/src/helpers/mkshadow.sh apache-1.3/src/helpers/mkshadow.sh
--- apache-1.3.bak/src/helpers/mkshadow.sh	Fri Jan 15 15:55:24 1999
+++ apache-1.3/src/helpers/mkshadow.sh	Fri Jan 15 17:58:40 1999
@@ -37,7 +37,7 @@
 
 #   determine reverse directory for destination directory
 dstrevdir=''
-if [ $oneisabs = 0 ]; then
+if [ "x$oneisabs" = "x0" ]; then
     #   (inlined fp2rp)
     OIFS2="$IFS"; IFS='/'
     for pe in $dst; do
@@ -88,8 +88,8 @@
      dir=`echo $file | sed -e 's:[^/]*$::' -e 's:/$::' -e 's:$:/:' -e 's:^/$::'`
      from="$src/$file"
      to="$dst/$dir$basename"
-     if [ $oneisabs = 0 ]; then
-         if [ ".$dir" != . ]; then
+     if [ "x$oneisabs" = "x0" ]; then
+         if [ "x$dir" != "x" ]; then
              subdir=`echo $dir | sed -e 's:/$::'`
              #   (inlined fp2rp)
              revdir=''
diff -r -u apache-1.3.bak/src/helpers/ppl.sh apache-1.3/src/helpers/ppl.sh
--- apache-1.3.bak/src/helpers/ppl.sh	Fri Jan 15 15:53:07 1999
+++ apache-1.3/src/helpers/ppl.sh	Fri Jan 15 17:58:40 1999
@@ -16,7 +16,7 @@
 list=`
 IFS=:
 for entry in $*; do
-    if [ ".$entry" != . ]; then
+    if [ "x$entry" != "x" ]; then
         echo $entry
     fi
 done |\
diff -r -u apache-1.3.bak/src/helpers/slo.sh apache-1.3/src/helpers/slo.sh
--- apache-1.3.bak/src/helpers/slo.sh	Fri Jan 15 17:21:39 1999
+++ apache-1.3/src/helpers/slo.sh	Fri Jan 15 17:58:42 1999
@@ -47,7 +47,7 @@
 #   set linker default directories
 #
 DIRS_DEFAULT='/lib:/usr/lib'
-if [ ".$LD_LIBRARY_PATH" != . ]; then
+if [ "x$LD_LIBRARY_PATH" != "x" ]; then
     DIRS_DEFAULT="$DIRS_DEFAULT:$LD_LIBRARY_PATH"
 fi
 
@@ -64,7 +64,7 @@
 #    for each library...
 OIFS="$IFS" IFS=':'
 for lib in $LIBS; do
-    [ ".$lib" = . ] && continue
+    [ "x$lib" = "x" ] && continue
 
     found='no'
     found_indefdir='no'
@@ -74,14 +74,14 @@
     #    for each directory...
     OIFS2="$IFS" IFS=":$DIFS"
     for dir in ${DIRS} switch-to-defdirs ${DIRS_DEFAULT}; do
-        [ ".$dir" = . ] && continue
-        [ ".$dir" = .switch-to-defdirs ] && found_indefdir=yes
+        [ "x$dir" = "x" ] && continue
+        [ "x$dir" = "xswitch-to-defdirs" ] && found_indefdir=yes
         [ ! -d $dir ] && continue
 
         #    search the file
         OIFS3="$IFS" IFS="$DIFS"
         for file in '' `cd $dir && ls lib${lib}.* 2>/dev/null`; do
-             [ ".$file" = . ] && continue
+             [ "x$file" = "x" ] && continue
              case $file in
                  *.so|*.so.[0-9]*|*.sl|*.sl.[0-9]* )
                       found=yes;
@@ -93,7 +93,7 @@
                       found_type=PIC 
                       ;;
                  *.a )
-                      if [ ".$found_type" = . ]; then
+                      if [ "x$found_type" = "x" ]; then
                           found=yes
                           found_type=OBJ 
                       fi
@@ -101,15 +101,15 @@
              esac
         done
         IFS="$OIFS3"
-        if [ ".$found" = .yes ]; then
+        if [ "x$found" = "xyes" ]; then
             found_dir="$dir"
             break
         fi
     done
     IFS="$OIFS2"
 
-    if [ ".$found" = .yes ]; then
-        if [ ".$found_indefdir" != .yes ]; then
+    if [ "x$found" = "xyes" ]; then
+        if [ "x$found_indefdir" != "xyes" ]; then
             eval "dirlist=\"\${DIRS_${found_type}}:\""
             if [ ".`echo \"$dirlist\" | fgrep :$found_dir:`" = . ]; then
                 eval "DIRS_${found_type}=\"\$DIRS_${found_type}:${found_dir}\""
@@ -148,7 +148,7 @@
     eval "libs=\"\$LIBS_${type}\""
     opts=''
     for lib in $libs; do
-        [ ".$lib" = . ] && continue
+        [ "x$lib" = "x" ] && continue
         opts="$opts -l$lib"
     done
     eval "LIBS_${type}=\"$opts\""
@@ -156,7 +156,7 @@
     eval "dirs=\"\$DIRS_${type}\""
     opts=''
     for dir in $dirs; do
-        [ ".$dir" = . ] && continue
+        [ "x$dir" = "x" ] && continue
         opts="$opts -L$dir"
     done
     eval "DIRS_${type}=\"$opts\""
-- 
===========================================================================
   Jim Jagielski   |||   jim@jaguNET.com   |||   http://www.jaguNET.com/
            "That's no ordinary rabbit... that's the most foul,
            cruel and bad-tempered rodent you ever laid eyes on"

Mime
View raw message