OSSP CVS Repository

ossp - Check-in [4573]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4573
Date: 2004-May-08 21:09:58 (local)
2004-May-08 19:09:58 (UTC)
User:rse
Branch:
Comment: Add option "-q" to "shtool subst" for suppressing a new warning on substitution operation resulting in no content change.
Tickets:
Inspections:
Files:
ossp-pkg/shtool/ChangeLog      1.200 -> 1.201     4 inserted, 0 deleted
ossp-pkg/shtool/README      1.103 -> 1.104     1 inserted, 1 deleted
ossp-pkg/shtool/VERSION      1.78 -> 1.79     1 inserted, 1 deleted
ossp-pkg/shtool/sh.subst      1.12 -> 1.13     16 inserted, 3 deleted
ossp-pkg/shtool/shtool.spec      1.21 -> 1.22     1 inserted, 1 deleted

ossp-pkg/shtool/ChangeLog 1.200 -> 1.201

--- ChangeLog    2004/04/21 15:07:41     1.200
+++ ChangeLog    2004/05/08 19:09:58     1.201
@@ -11,6 +11,10 @@
 
  Changes between 2.0b2 and 2.0b3 (07-Apr-2004 to 21-Apr-2004):
 
+   *) Add option "-q" to "shtool subst" for suppressing a new warning on
+      substitution operation resulting in no content change.
+      [Ralf S. Engelschall]
+
    *) Port "sh.platform" to full POSIX 1003.1-2001 (SUSv3) compliance by
       replacing "head -1" with "sed -e 'q'" and "tail -1" with "sed -n -e '$p'".
       [Ralf S. Engelschall]


ossp-pkg/shtool/README 1.103 -> 1.104

--- README       2004/04/07 07:55:19     1.103
+++ README       2004/05/08 19:09:58     1.104
@@ -10,7 +10,7 @@
   http://www.gnu.org/software/shtool/
   ftp://ftp.gnu.org/gnu/shtool/
 
-  Version 2.0b2 (07-Apr-2004)
+  Version 2.0b3 (08-May-2004)
 
   The GNU shtool program is a compilation of small but very stable and
   portable shell scripts into a single shell tool. All ingredients


ossp-pkg/shtool/VERSION 1.78 -> 1.79

--- VERSION      2004/04/07 07:55:19     1.78
+++ VERSION      2004/05/08 19:09:58     1.79
@@ -2,5 +2,5 @@
   VERSION -- Version Information for GNU shtool (syntax: Text)
   [automatically generated and maintained by GNU shtool]
 
-  This is GNU shtool, Version 2.0b2 (07-Apr-2004)
+  This is GNU shtool, Version 2.0b3 (08-May-2004)
 


ossp-pkg/shtool/sh.subst 1.12 -> 1.13

--- sh.subst     2004/02/17 08:54:14     1.12
+++ sh.subst     2004/05/08 19:09:58     1.13
@@ -19,14 +19,15 @@
 ##
 
 str_tool="subst"
-str_usage="[-v|--verbose] [-t|--trace] [-n|--nop] [-s|--stealth] [-i|--interactive] [-b|--backup <ext>] [-e|--exec <cmd>] [-f|--file <cmd-file>] [<file>] [...]"
+str_usage="[-v|--verbose] [-t|--trace] [-n|--nop] [-q|--quiet] [-s|--stealth] [-i|--interactive] [-b|--backup <ext>] [-e|--exec <cmd>] [-f|--file <cmd-file>] [<file>] [...]"
 gen_tmpfile=yes
 arg_spec="0+"
-opt_spec="v.t.n.s.i.b:e+f:"
-opt_alias="v:verbose,t:trace,n:nop,s:stealth,i:interactive,b:backup,e:exec,f:file"
+opt_spec="v.t.n.q.s.i.b:e+f:"
+opt_alias="v:verbose,t:trace,n:nop,q:quiet,s:stealth,i:interactive,b:backup,e:exec,f:file"
 opt_v=no
 opt_t=no
 opt_n=no
+opt_q=no
 opt_s=no
 opt_i=no
 opt_b=""
@@ -142,6 +143,13 @@
             fi
         fi
 
+        #   optionally check whether any content change actually occurred 
+        if [ ".$opt_q" = .no ]; then
+            if cmp $file$orig $file >/dev/null 2>&1; then
+                echo "$msgprefix:Warning: substitution operation results in no content change" 1>&2
+            fi
+        fi
+
         #   optionally remove preserved original file
         if [ ".$opt_b" = . ]; then
             if [ ".$opt_t" = .yes ]; then
@@ -183,6 +191,7 @@
 [B<-v>|B<--verbose>]
 [B<-t>|B<--trace>]
 [B<-n>|B<--nop>]
+[B<-q>|B<--quiet>]
 [B<-s>|B<--stealth>]
 [B<-i>|B<--interactive>]
 [B<-b>|B<--backup> I<ext>]
@@ -214,6 +223,10 @@
 No operation mode. Actual execution of the essential shell commands
 which would be executed is suppressed.
 
+=item B<-q>, B<--quiet>
+
+Suppress warning on substitution operation resulting in no content change.
+
 =item B<-s>, B<--stealth>
 
 Stealth operation. Preserve timestamp on I<file>.


ossp-pkg/shtool/shtool.spec 1.21 -> 1.22

--- shtool.spec  2004/04/07 07:55:19     1.21
+++ shtool.spec  2004/05/08 19:09:58     1.22
@@ -30,7 +30,7 @@
 %define prefix /usr/local
 %endif
 
-%define ver 2.0b2
+%define ver 2.0b3
 %define rel 0
 
 Name:       shtool

CVSTrac 2.0.1