OSSP CVS Repository

ossp - Difference in ossp-pkg/shtool/sh.rotate versions 1.7 and 1.8
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/shtool/sh.rotate 1.7 -> 1.8

--- sh.rotate    2003/04/29 08:01:01     1.7
+++ sh.rotate    2003/08/13 14:20:34     1.8
@@ -71,7 +71,7 @@
 fi
 
 #   option -d/-z consistency
-if [ ".$opt_d" = .yes -a ".$opt_z" = . ]; then
+if [ ".$opt_d" = .yes ] && [ ".$opt_z" = . ]; then
     echo "$msgprefix:Error: option -d requires option -z." 1>&2
     shtool_exit 1
 fi
@@ -125,7 +125,7 @@
                     -e 's/:/ /g'`"
         for prg in bzip2 gzip compress; do
             for path in $paths; do
-                if [ $minusx "$path/$prg" -a ! -d "$path/$prg" ]; then
+                if [ $minusx "$path/$prg" ] && [ ! -d "$path/$prg" ]; then
                     comp_prg="$prg"
                     break
                 fi
@@ -234,7 +234,7 @@
         m=$n
         n=`expr $n - 1`
         n=`echo dummy | awk "{ printf(\"%0${opt_p}d\", n); }" n=$n`
-        if [ $n -eq 0 -a ".$opt_d" = .yes ]; then
+        if [ $n -eq 0 ] && [ ".$opt_d" = .yes ]; then
             #   special case: first rotation file under delayed compression situation
             if [ ! -f "${adir}/${file}.${n}" ]; then
                 continue
@@ -345,7 +345,7 @@
     fi
 
     #   regular compression step
-    if [ ".$opt_z" != . -a ".$opt_d" = .no ]; then
+    if [ ".$opt_z" != . ] && [ ".$opt_d" = .no ]; then
         #   compress file
         if [ ".$opt_b" = .yes ]; then
             if [ ".$opt_t" = .yes ]; then

CVSTrac 2.0.1