[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.7.1-20110619-268-ge8049ec)



The branch, master has been updated
       via  e8049ecbcab0dda94245b6ded9a2d89bfcf6733e (commit)
      from  7a54f5fbdc0985ff9d2e399c2386bac7b53b093a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 utils/scripts/pads_backannotate |   29 +++++++++++++++--------------
 utils/scripts/pcb_backannotate  |   27 ++++++++++++++++-----------
 2 files changed, 31 insertions(+), 25 deletions(-)


=================
 Commit Messages
=================

commit e8049ecbcab0dda94245b6ded9a2d89bfcf6733e
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>

    Update the options parsing to take short options as well as long options.
    
    This brings the script behavior more in line with the man page description
    and also provides the short options which are prefered by some users.

:100755 100755 84fe2be... a88f310... M	utils/scripts/pads_backannotate
:100755 100755 eac08d4... 31018bb... M	utils/scripts/pcb_backannotate

=========
 Changes
=========

commit e8049ecbcab0dda94245b6ded9a2d89bfcf6733e
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>

    Update the options parsing to take short options as well as long options.
    
    This brings the script behavior more in line with the man page description
    and also provides the short options which are prefered by some users.

diff --git a/utils/scripts/pads_backannotate b/utils/scripts/pads_backannotate
index 84fe2be..a88f310 100755
--- a/utils/scripts/pads_backannotate
+++ b/utils/scripts/pads_backannotate
@@ -1,8 +1,6 @@
 #!/usr/bin/perl -w
 #
-# $Id$
-#
-# Copyright (C) 2003 Dan McMahill
+# Copyright (C) 2003, 2011 Dan McMahill
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,10 +31,13 @@ use POSIX;
 # don't allow -he to be interpreted as --help
 $Getopt::Long::autoabbrev=0;
 
-&GetOptions( ("help" => \&usage,
-	      "nocopy" => \$nocopy,
-	      "verbose" => \$verbose,
-	      "version" => \&version
+# make the options be case sensitive
+$Getopt::Long::ignorecase=0;
+
+&GetOptions( ('h|help' => \&usage,
+	      'n|nocopy' => \$nocopy,
+	      'v|verbose' => \$verbose,
+	      'V|version' => \&version
 	     ) );
 
 usage() if $Getopt::Long::error;
@@ -314,24 +315,24 @@ sub usage {
   $pname =~ s/.*\///g;
 
   print "Usage:\n\n";
-  print "\t$pname [--nocopy] [--verbose] change.eco file1.sch [file2.sch [file3.sch ... ] ]\n";
-  print "\t$pname --help\n";
-  print "\t$pname --version\n";
+  print "\t$pname [-n|--nocopy] [-v|--verbose] change.eco file1.sch [file2.sch [file3.sch ... ] ]\n";
+  print "\t$pname -h|--help\n";
+  print "\t$pname -V|--version\n";
   print "\n";
   print "$pname reads a PADS PowerPCB ECO file and backannotates changes\n";
   print "to a gEDA schematic.\n";
   print "\n";
   print "$pname accepts the following options:\n";
   print "\n";
-  print "    --help      Displays this help message.\n";
+  print "    -h|--help      Displays this help message.\n";
   print "\n";
-  print "    --nocopy    If given, this flag leaves the modified files in new files\n";
+  print "    -n|--nocopy    If given, this flag leaves the modified files in new files\n";
   print "                whose names are generated by appending a \".new\" to the\n";
   print "                original file names.  The default is to overwrite the original.\n";
   print "\n";
-  print "    --verbose   Enables verbose output.\n";
+  print "    -v|--verbose   Enables verbose output.\n";
   print "\n";
-  print "    --version   Shows the version of this program.\n";
+  print "    -V|--version   Shows the version of this program.\n";
   print "\n\n";
   print "$pname was written by Dan McMahill <dmcmahill\@netbsd.org>\n";
   print "\n\n";
diff --git a/utils/scripts/pcb_backannotate b/utils/scripts/pcb_backannotate
index eac08d4..31018bb 100755
--- a/utils/scripts/pcb_backannotate
+++ b/utils/scripts/pcb_backannotate
@@ -1,8 +1,6 @@
 #!/usr/bin/perl -w
 #
-# $Id$
-#
-# Copyright (C) 2003, 2006 Dan McMahill
+# Copyright (C) 2003, 2006, 2010 Dan McMahill
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,10 +33,13 @@ use POSIX;
 # don't allow -he to be interpreted as --help
 $Getopt::Long::autoabbrev=0;
 
-&GetOptions( ("help" => \&usage,
-	      "nocopy" => \$nocopy,
-	      "verbose" => \$verbose,
-	      "version" => \&version
+# make the options be case sensitive
+$Getopt::Long::ignorecase=0;
+
+&GetOptions( ('h|help' => \&usage,
+	      'n|nocopy' => \$nocopy,
+	      'v|verbose' => \$verbose,
+	      'V|version' => \&version
 	     ) );
 
 usage() if $Getopt::Long::error;
@@ -63,7 +64,7 @@ $filecnt = $i;
 
 
 if( $verbose ){ print "Loading PCB annotation file file: $eco\n"; }
-#$eco_state="DEFAULT";
+my $eco_state="DEFAULT";
 open( ECO, "$eco" ) or die "Can't open PCB annotation file $eco !\n";
 
 my $ver = 0;
@@ -281,23 +282,27 @@ sub usage {
 
 Usage:
 
-  $pname [--nocopy] [--verbose] change.log file1.sch [file2.sch ...]
-  $pname --help\n
-  $pname --version\n
+  $pname [-n|--nocopy] [-v|--verbose] change.log file1.sch [file2.sch ...]
+  $pname -h|--help\n
+  $pname -V|--version\n
 
 $pname reads a PCB annotation file and backannotates changes\n
 to a gEDA schematic.
 
 $pname accepts the following options:
 
+  -h
   --help      Displays this help message.
 
+  -n
   --nocopy    If given, this flag leaves the modified files in new files
               whose names are generated by appending a \".new\" to the
               original file names.  The default is to overwrite the original.
 
+  -v
   --verbose   Enables verbose output.
 
+  -V
   --version   Shows the version of this program.
 
 




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs