Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /svnutils/trunk/src/

svnutils
Discussion topic

Back to topic list

CVS update: /svnutils/trunk/src/

Author sunny256
Full name Øyvind A. Holm
Date 2005-04-30 18:36:05 PDT
Message User: sunny256
Date: 2005/04/30 18:36:05

Modified:
   svnutils/trunk/src/sident

Log:
 r133 | sunny256 | 2005-05-01 01:27:12 +0000 (Sun, 01 May 2005) | 6 lines
 
 Add the -l parameter to sident.
 
 * /trunk/src/sident
   Added the -l parameter which only prints the file names instead of
   normal output.

File Changes:

Directory: /svnutils/trunk/src/
===============================

File [changed]: sident
Url: http://svnutils.tigr​is.org/source/browse​/svnutils/trunk/src/​sident?r1=1.5&r2​=1.6
Delta lines: +20 -9
--------------------
--- sident 22 Dec 2004 16:31:22 -0000 1.5
+++ sident 1 May 2005 01:36:02 -0000 1.6
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 #===================​====================​====================​============
-# $Id: sident 93 2004-12-22 16:28:27Z sunny256 $
+# $Id: sident 133 2005-05-01 01:27:12Z sunny256 $
 # Lists RCS-like keywords in files. Replacement for ident(1).
 #
 # Character set: UTF-8
@@ -14,9 +14,9 @@
 $| = 1;
 
 use Getopt::Std;
-our ($opt_h, $opt_k) =
- ( 0, 0);
-getopts('hk') || die("Option error. Use -h for help.\n");
+our ($opt_h, $opt_k, $opt_l) =
+ ( 0, 0, 0);
+getopts('hkl') || die("Option error. Use -h for help.\n");
 
 my @Keywords = (
                 "Id",
@@ -45,12 +45,16 @@
             s/(\$($Keyw)::? .*? \$)/push(@Out, " $1\n")/ge;
         }
         if (scalar(@Out)) {
+ if ($opt_l) {
+ print("$File\n");
+ } else {
             print("\n$File:\n");
             for (@Out) {
                 print($_);
             }
         }
     }
+ }
 }
 
 sub usage {
@@ -68,6 +72,8 @@
 
   -h Print this help
   -k Only list keywords known to Subversion and CVS
+ -l Suppress normal output; only list names of files which contain
+ keywords
 
 END
     exit($Retval);
@@ -86,7 +92,7 @@
 
 =head1 REVISION
 
-$Id: sident 93 2004-12-22 16:28:27Z sunny256 $
+$Id: sident 133 2005-05-01 01:27:12Z sunny256 $
 
 =head1 SYNOPSIS
 
@@ -108,6 +114,11 @@
 
 Only list keywords known to Subversion and CVS.
 
+=item B<-l>
+
+Suppress normal output; only list names of files which contains
+keywords.
+
 =back
 
 =head1 BUGS
@@ -146,4 +157,4 @@
 # }}}
 
 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :
-# End of file $Id: sident 93 2004-12-22 16:28:27Z sunny256 $
+# End of file $Id: sident 133 2005-05-01 01:27:12Z sunny256 $

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /svnutils/trunk/src/ sunny256 Øyvind A. Holm 2005-04-30 18:36:05 PDT
Messages per page: