OSSP CVS Repository

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

ossp-pkg/shtool/sh.subst 1.10 -> 1.11

--- sh.subst     2004/01/01 16:54:20     1.10
+++ sh.subst     2004/02/12 16:06:27     1.11
@@ -1,7 +1,6 @@
 ##
 ##  subst -- Apply sed(1) substitution operations
 ##  Copyright (c) 2001-2004 Ralf S. Engelschall <rse@engelschall.com>
-##  Originally written for OpenPKG's rpmtool
 ##
 ##  This file is part of shtool and free software; you can redistribute
 ##  it and/or modify it under the terms of the GNU General Public
@@ -55,7 +54,7 @@
     OIFS="$IFS"; IFS="$ASC_NL"; set -- $opt_e; IFS="$OIFS"
     for e
     do
-        sedcmd="$sedcmd -e '$e'" 
+        sedcmd="$sedcmd -e '$e'"
     done
 elif [ ".$opt_f" != . ]; then
     if [ ! -f $opt_f ]; then
@@ -166,3 +165,101 @@
     fi
 fi
 
+shtool_exit 0
+
+##
+##  manual page
+##
+
+=pod
+
+=head1 NAME
+
+B<shtool subst> - B<GNU shtool> sed(1) substitution operations
+
+=head1 SYNOPSIS
+
+B<shtool subst>
+[B<-v>|B<--verbose>]
+[B<-t>|B<--trace>]
+[B<-n>|B<--nop>]
+[B<-s>|B<--stealth>]
+[B<-i>|B<--interactive>]
+[B<-b>|B<--backup> I<ext>]
+[B<-e>|B<--exec> I<cmd>]
+[B<-f>|B<--file> I<cmd-file>]
+[I<file>] [I<file> ...]
+
+=head1 DESCRIPTION
+
+This command applies one or more sed(1) substitution operations to
+F<stdin> or any number of files.
+
+=head1 OPTIONS
+
+The following command line options are available.
+
+=over 4
+
+=item B<-v>, B<--verbose>
+
+Display some processing information.
+
+=item B<-t>, B<--trace>
+
+Enable the output of the essential shell commands which are executed.
+
+=item B<-n>, B<--nop>
+
+No operation mode. Actual execution of the essential shell commands
+which would be executed is suppressed.
+
+=item B<-s>, B<--stealth>
+
+Stealth operation. Preserve timestamp on I<file>.
+
+=item B<-i>, B<--interactive>
+
+Enter interactive mode where the user has to approve each operation.
+
+=item B<-b>, B<--backup> I<ext>
+
+Preserve backup of original file using file name extension I<ext>      .
+Default is to overwrite the original file                              .
+
+=item B<-e>, B<--exec> I<cmd>
+
+Specify sed(1) command directly.
+
+=item B<-f>, B<--file> I<cmd-file>
+
+Read sed(1) command from I<file>.
+
+=back
+
+=head1 EXAMPLE
+
+ #   shell script
+ shtool subst -i -e 's;(c) \([0-9]*\)-2000;(c) \1-2001;' *.[ch]
+
+ #    RPM spec-file
+ %install
+     shtool subst -v -n \
+         -e 's;^\(prefix=\).*;\1 $RPM_BUILD_ROOT%{_prefix};g' \
+         -e 's;^\(sysconfdir=\).*;\1 $RPM_BUILD_ROOT%{_prefix}/etc;g' \
+         `find . -name Makefile -print`
+     make install
+
+=head1 HISTORY
+
+The B<GNU shtool> B<subst> command was originally written by Ralf S.
+Engelschall E<lt>rse@engelschall.comE<gt> in 2001 for B<GNU shtool>.
+It was prompted by the need to have a uniform and convinient patching
+frontend to sed(1) operations in the B<OpenPKG> package specifications.
+
+=head1 SEE ALSO
+
+shtool(1), sed(1).
+
+=cut
+

CVSTrac 2.0.1