Author: mes
Date: 2011-09-01 15:50:56 -0700 (Thu, 01 Sep 2011)
New Revision: 26696
Added:
core3/cy3/updatePropertyVersions.pl
Log:
updated property versions to new snapshots
Added: core3/cy3/updatePropertyVersions.pl
===================================================================
--- core3/cy3/updatePropertyVersions.pl (rev 0)
+++ core3/cy3/updatePropertyVersions.pl 2011-09-01 22:50:56 UTC (rev 26696)
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use Cwd;
+
+use File::Find;
+use File::Copy;
+
+die "USAGE: $0 <property.id> <new.version>\n" if $#ARGV != 2;
+
+my $property_name=$ARGV[0];
+my $new_version=$ARGV[1];
+my $file_pattern = "pom.xml";
+
+find(\&processFile, cwd);
+
+sub processFile {
+
+ my $file = $File::Find::name;
+
+ return unless -f $file;
+ return unless $file =~ /$file_pattern$/;
+
+ open F, $file or print "couldn't open $file\n" && return;
+ open NF, ">$file.new" or print "couldn't open $file.new\n" && return;
+
+ while (<F>) {
+ $_ =~
s/<$property_name>.+<\/$property_name>/<$property_name>$new_version<\/$property_name>/g;
+ print NF $_;
+ }
+ close F;
+ close NF;
+
+ move "$file.new", "$file";
+}
Property changes on: core3/cy3/updatePropertyVersions.pl
___________________________________________________________________
Added: svn:executable
+ *
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.