[cig-commits] r22459 - seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/utils
dkomati1 at geodynamics.org
dkomati1 at geodynamics.org
Sun Jun 30 07:00:04 PDT 2013
Author: dkomati1
Date: 2013-06-30 07:00:04 -0700 (Sun, 30 Jun 2013)
New Revision: 22459
Modified:
seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/utils/update_headers_change_word_f90.pl
Log:
updated utils/update_headers_change_word_f90.pl
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/utils/update_headers_change_word_f90.pl
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/utils/update_headers_change_word_f90.pl 2013-06-30 13:28:22 UTC (rev 22458)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/utils/update_headers_change_word_f90.pl 2013-06-30 14:00:04 UTC (rev 22459)
@@ -16,48 +16,39 @@
# in the code (which is dangerous, but really easier to program...)
#
-#
-# usage: ./update_headers_change_word_f90.pl
-# run in directory root SPECFEM3D/
-#
+ @objects = `ls ../src/*/*.f90 ../src/*/*.F90 ../src/*/*.c ../src/*/*.cu ../src/*/*.h.in ../src/*/*.h`;
-
- at objects = `ls src/*/*.f90 src/*/*.F90 src/*/*.h.in src/*/*.h src/*/*.c src/*/*.cu setup/*.h.in`;
-
-foreach $name (@objects) {
- chop $name;
-
+ foreach $name (@objects) {
+ chop $name;
# change tabs to white spaces
- system("expand -2 < $name > _____tutu01_____");
- $f90name = $name;
- print STDOUT "Changing word in file $name ...\n";
+ system("expand -2 < $name > _____tutu01_____");
+ $f90name = $name;
+ print STDOUT "Changing word in file $name ...\n";
- open(FILEF77,"<_____tutu01_____");
- open(FILEF90,">$f90name");
+ open(FILEF77,"<_____tutu01_____");
+ open(FILEF90,">$f90name");
# open the source file
- while($line = <FILEF77>) {
- chop $line;
+ while($line = <FILEF77>) {
+ chop $line;
# suppress trailing white spaces and carriage return
- $line =~ s/\s*$//;
+ $line =~ s/\s*$//;
-# converts tabs to space
- $line =~ s/\t/ /g;
-
# change the version number and copyright information
-# $line =~ s#\(c\) California Institute of Technology and University of Pau, October 2007#\(c\) California Institute of Technology and University of Pau, November 2007#og;
-# $line =~ s#rmass_sigma#rmass_time_integral_of_sigma#og;
+# $line =~ s#! and University of Pau / CNRS / INRIA, France#! and CNRS / INRIA / University of Pau, France#og;
+# $line =~ s#! \(c\) Princeton University / California Institute of Technology and University of Pau / CNRS / INRIA#! \(c\) Princeton University and CNRS / INRIA / University of Pau#og;
+# $line =~ s#rmass_sigma#rmass_time_integral_of_sigma#og;
# write the modified line to the output file
- print FILEF90 "$line\n";
+ print FILEF90 "$line\n";
}
- close(FILEF77);
- close(FILEF90);
+ close(FILEF77);
+ close(FILEF90);
-}
+ }
-system("rm -f _____tutu01_____");
+ system("rm -f _____tutu01_____");
More information about the CIG-COMMITS
mailing list