X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=cp-update.1;h=b8cd11b3d7b0d4b382c0d3bc2a723756a370eb7d;hb=64e2d2cffac17873e3dc3e342edf87344d5552b3;hp=eb8cde166e8fec4877c4dada3903fd88a718fe24;hpb=f98b8bf1105eb129c91f8263555a708ae7523b86;p=carnet-tools-cn.git diff --git a/cp-update.1 b/cp-update.1 index eb8cde1..b8cd11b 100644 --- a/cp-update.1 +++ b/cp-update.1 @@ -1,5 +1,5 @@ .\" Copied from from Pod::Man template -.\" Wed, 23 Mar 2005 11:51:08 +0100 +.\" Wed, 14 Mar 2006 21:15:00 +0100 .\" .\" Standard preamble: .\" ====================================================================== @@ -38,7 +38,7 @@ .if n .na .\" .IX Title "cp-update 1" -.TH cp-update 1 "March 2005" CARNet "CARNet Packaging Tools" +.TH cp-update 1 "March 2006" CARNet "CARNet Packaging Tools" .SH NAME cp-update \- versatile line-based file updating tool .\" @@ -81,15 +81,15 @@ block marking and file handling. Remove entry \fIpackage\fR from \fIfile\fR. Default is to add lines from stdin. .TP +\fB\-x\fR | \fB\-\-change\fR +Modify existing block, or add it if it does not exist but the begin +mark can be found. Does basically the same as regular insert without +\-\-allow\-multiple but on other way (in-place). Thus those two options +are mutually exclusive. +.TP \fB\-m\fR | \fB\-\-allow\-multiple\fR Allow multiple blocks of the same type. By default, old blocks are replaced with the new one. -.TP -\fB\-h\fR | \fB\-\-help\fR -Print usage reference and exit. -.TP - \fB\-\-version\fR -Print title, version, copyright message, and exit. .SS Placement control .TP \fB\-t\fR | \fB\-\-insert\-on\-top\fR @@ -100,9 +100,8 @@ Insert after the first line that matches given pattern. .TP \fB\-f\fR | \fB\-\-insert\-before\fR \fIpattern\fR Insert before the first line that matches given pattern. -.TP -\fB\-R\fR | \fB\-\-regexp\-match\fR | \fB\-\-regexp\fR -Use regexp mode for line matching. +.PP +Line-matching patterns are PCREs (Perl-compatible regular expressions). .SS Manipulating block marks .TP \fB\-c\fR | \fB\-\-comment\fR \fIstring\fR @@ -140,6 +139,13 @@ anew and replaces the old by renaming it to target name. \fB\-n\fR | \fB\-\-no\-close\fR Do not close and reopen file when editing it in place. Slightly optimized version of the above. +.SS Support modes +.TP +\fB\-h\fR | \fB\-\-help\fR +Print usage reference and exit. +.TP + \fB\-\-version\fR +Print title, version, copyright message, and exit. .\" .SH "EXIT STATUS" Upon successful execution of given operation, program returns @@ -167,7 +173,7 @@ the inserted block between customized markers): .RS .Sp .Vb 4 -\& cp-update --regexp --insert-before '' \\ +\& cp-update --insert-before '' \\ \& --comment '' \\ \& gentoo-cn /etc/gentoorc < gentoo-cn.ins .Ve @@ -177,9 +183,9 @@ the same markers as we did when the block was inserted): .RS .Sp .Vb 4 -\& cp-update -r --regexp --insert-before '' \\ -\& --comment '' \\ -\& gentoo-cn /etc/gentoorc +\& cp-update -r --insert-before '' \\ +\& --comment '' \\ +\& gentoo-cn /etc/gentoorc .Ve .RE .\"