|
@@ -6,7 +6,7 @@
|
|
|
## See http://www.gnu.org/software/shtool/ for more information.
|
|
## See http://www.gnu.org/software/shtool/ for more information.
|
|
|
## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
|
|
## 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
|
|
## Contents: all available modules
|
|
|
##
|
|
##
|
|
|
|
|
|
|
@@ -65,7 +65,7 @@ if [ $# -eq 0 ]; then
|
|
|
exit 1
|
|
exit 1
|
|
|
fi
|
|
fi
|
|
|
if [ ".$1" = ".-h" ] || [ ".$1" = ".--help" ]; then
|
|
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 "Copyright (c) 1994-2004 Ralf S. Engelschall <rse@engelschall.com>"
|
|
|
echo "Report bugs to <bug-shtool@gnu.org>"
|
|
echo "Report bugs to <bug-shtool@gnu.org>"
|
|
|
echo ''
|
|
echo ''
|
|
@@ -107,9 +107,9 @@ if [ ".$1" = ".-h" ] || [ ".$1" = ".--help" ]; then
|
|
|
echo ' [-c|--compress <prog>] [-d|--directory <dir>] [-u|--user'
|
|
echo ' [-c|--compress <prog>] [-d|--directory <dir>] [-u|--user'
|
|
|
echo ' <user>] [-g|--group <group>] [-e|--exclude <pattern>]'
|
|
echo ' <user>] [-g|--group <group>] [-e|--exclude <pattern>]'
|
|
|
echo ' <path> [<path> ...]'
|
|
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 ' platform [-F|--format <format>] [-S|--sep <string>] [-C|--conc'
|
|
|
echo ' <string>] [-L|--lower] [-U|--upper] [-v|--verbose]'
|
|
echo ' <string>] [-L|--lower] [-U|--upper] [-v|--verbose]'
|
|
|
echo ' [-c|--concise] [-n|--no-newline] [-t|--type <type>]'
|
|
echo ' [-c|--concise] [-n|--no-newline] [-t|--type <type>]'
|
|
@@ -131,7 +131,7 @@ if [ ".$1" = ".-h" ] || [ ".$1" = ".--help" ]; then
|
|
|
exit 0
|
|
exit 0
|
|
|
fi
|
|
fi
|
|
|
if [ ".$1" = ".-v" ] || [ ".$1" = ".--version" ]; then
|
|
if [ ".$1" = ".-v" ] || [ ".$1" = ".--version" ]; then
|
|
|
- echo "GNU shtool 2.0b2 (07-Apr-2004)"
|
|
|
|
|
|
|
+ echo "GNU shtool 2.0b3 (08-May-2004)"
|
|
|
exit 0
|
|
exit 0
|
|
|
fi
|
|
fi
|
|
|
if [ ".$1" = ".-r" ] || [ ".$1" = ".--recreate" ]; then
|
|
if [ ".$1" = ".-r" ] || [ ".$1" = ".--recreate" ]; then
|
|
@@ -317,14 +317,15 @@ case $tool in
|
|
|
;;
|
|
;;
|
|
|
subst )
|
|
subst )
|
|
|
str_tool="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
|
|
gen_tmpfile=yes
|
|
|
arg_spec="0+"
|
|
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_v=no
|
|
|
opt_t=no
|
|
opt_t=no
|
|
|
opt_n=no
|
|
opt_n=no
|
|
|
|
|
+ opt_q=no
|
|
|
opt_s=no
|
|
opt_s=no
|
|
|
opt_i=no
|
|
opt_i=no
|
|
|
opt_b=""
|
|
opt_b=""
|
|
@@ -2451,6 +2452,13 @@ subst )
|
|
|
fi
|
|
fi
|
|
|
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
|
|
# optionally remove preserved original file
|
|
|
if [ ".$opt_b" = . ]; then
|
|
if [ ".$opt_b" = . ]; then
|
|
|
if [ ".$opt_t" = .yes ]; then
|
|
if [ ".$opt_t" = .yes ]; then
|