Przeglądaj źródła

upgraded to GNU shtool 2.0b3

Ralf S. Engelschall 21 lat temu
rodzic
commit
07655cd1f0
3 zmienionych plików z 20 dodań i 10 usunięć
  1. 2 0
      openpkg/HISTORY
  2. 1 1
      openpkg/openpkg.spec
  3. 17 9
      openpkg/shtool

+ 2 - 0
openpkg/HISTORY

@@ -2,6 +2,8 @@
 2004
 ====
 
+20040408 upgraded to GNU shtool 2.0b3
+
 20040507 **** RELEASE AS PART OF OPENPKG 2.0.3 ***
 20040507 synchronize aux.prereq.sh platform checks with official list as of OpenPKG 2.0
 20040507 fix disk space detection in aux.prereq.sh script

+ 1 - 1
openpkg/openpkg.spec

@@ -39,7 +39,7 @@
 #   o any cc(1)
 
 #   the package version/release
-%define       V_openpkg  20040507
+%define       V_openpkg  20040508
 
 #   the used software versions
 %define       V_rpm      4.2.1

+ 17 - 9
openpkg/shtool

@@ -6,7 +6,7 @@
 ##  See http://www.gnu.org/software/shtool/ for more information.
 ##  See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
 ##
-##  Version:  2.0b2 (07-Apr-2004)
+##  Version:  2.0b3 (08-May-2004)
 ##  Contents: all available modules
 ##
 
@@ -65,7 +65,7 @@ if [ $# -eq 0 ]; then
     exit 1
 fi
 if [ ".$1" = ".-h" ] || [ ".$1" = ".--help" ]; then
-    echo "This is GNU shtool, version 2.0b2 (07-Apr-2004)"
+    echo "This is GNU shtool, version 2.0b3 (08-May-2004)"
     echo "Copyright (c) 1994-2004 Ralf S. Engelschall <rse@engelschall.com>"
     echo "Report bugs to <bug-shtool@gnu.org>"
     echo ''
@@ -107,9 +107,9 @@ if [ ".$1" = ".-h" ] || [ ".$1" = ".--help" ]; then
     echo '           [-c|--compress <prog>] [-d|--directory <dir>] [-u|--user'
     echo '           <user>] [-g|--group <group>] [-e|--exclude <pattern>]'
     echo '           <path> [<path> ...]'
-    echo '  subst    [-v|--verbose] [-t|--trace] [-n|--nop] [-s|--stealth]'
-    echo '           [-i|--interactive] [-b|--backup <ext>] [-e|--exec <cmd>]'
-    echo '           [-f|--file <cmd-file>] [<file>] [...]'
+    echo '  subst    [-v|--verbose] [-t|--trace] [-n|--nop] [-q|--quiet]'
+    echo '           [-s|--stealth] [-i|--interactive] [-b|--backup <ext>]'
+    echo '           [-e|--exec <cmd>] [-f|--file <cmd-file>] [<file>] [...]'
     echo '  platform [-F|--format <format>] [-S|--sep <string>] [-C|--conc'
     echo '           <string>] [-L|--lower] [-U|--upper] [-v|--verbose]'
     echo '           [-c|--concise] [-n|--no-newline] [-t|--type <type>]'
@@ -131,7 +131,7 @@ if [ ".$1" = ".-h" ] || [ ".$1" = ".--help" ]; then
     exit 0
 fi
 if [ ".$1" = ".-v" ] || [ ".$1" = ".--version" ]; then
-    echo "GNU shtool 2.0b2 (07-Apr-2004)"
+    echo "GNU shtool 2.0b3 (08-May-2004)"
     exit 0
 fi
 if [ ".$1" = ".-r" ] || [ ".$1" = ".--recreate" ]; then
@@ -317,14 +317,15 @@ case $tool in
         ;;
     subst )
         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=""
@@ -2451,6 +2452,13 @@ subst )
                 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