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

gEDA-cvs: CVS update: gsymupdate



  User: danmc   
  Date: 06/10/17 20:26:42

  Modified:    .        gsymupdate
  Log:
  - don't try to process files which don't exist
  
  - don't try to process directories as if they were files
  
  - if a file is skipped, keep processing the rest
  
  
  
  Addresses some of the issues noted by Matt Ettus on geda-user.
  
  
  
  
  Revision  Changes    Path
  1.7       +15 -2     eda/geda/gaf/utils/scripts/gsymupdate
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gsymupdate
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/utils/scripts/gsymupdate,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- gsymupdate	5 Jan 2004 01:26:41 -0000	1.6
  +++ gsymupdate	18 Oct 2006 00:26:42 -0000	1.7
  @@ -48,7 +48,21 @@
   
       if (-r "$filename.old") { 
           print "Found backup file: $filename.old.  Not gsymUpdating $filename\n";
  -    } else {
  +	next ;
  +    }
  +
  +    if ( -d "$filename") { 
  +        print "$filename is a directory not a file.  Not gsymUpdating $filename\n";
  +	next ;
  +    }
  +
  +    if (! -f "$filename") { 
  +        print "File $filename does not exist.  Not gsymUpdating $filename\n";
  +	next ;
  +    }
  +
  +# FIXME -- we should probably do some sanity checking to see that $filename is
  +# actually a symbol file.
   
           rename ($filename, "$filename.old");
           print "gsymUpdating: $filename (backup: $filename.old)\n";
  @@ -146,7 +160,6 @@
           @args = ("gschlas", "$filename");
           system(@args) == 0 || die "system @args failed: $?"
   
  -    }
   }
   
   
  
  
  


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