Changeset 27662 for other-projects/nightly-tasks/snapshot/trunk/task.pl
- Timestamp:
- 2013-06-19T16:37:22+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/snapshot/trunk/task.pl
r27661 r27662 71 71 72 72 if ( $major_version == 2 ) { 73 73 $ENV{'snapshot_id2'} = `$httpRetrieve http://www.greenstone.org/next-release.txt`; 74 74 chomp($ENV{'snapshot_id2'}); 75 75 } else { … … 79 79 80 80 #change the filenames to have the date in them 81 $ENV{'munges'} = "s/$ENV{'snapshot_id2'}/$ENV{'snapshot_id2'}-candidate-" . get_date() . "/g "; 82 $ENV{'munges'} .= "s/$ENV{'snapshot_id3'}/$ENV{'snapshot_id3'}-candidate-" . get_date() . "/g"; 81 my $id2 = $ENV{'snapshot_id2'}; 82 (my $id2re = $id2) =~ s@\.@\\.@g; #copy id2 and then change idre, see http://www.perlmonks.org/?node_id=366431 83 84 my $id3 = $ENV{'snapshot_id3'}; 85 (my $id3re = $id3) =~ s@\.@\\.@g; 86 87 $ENV{'munges'} = "s/-$id2re/-$id2-candidate-" . get_date() . "/g " if ($id2 =~ m/\S/); 88 $ENV{'munges'} .= "s/-$id3re/-$id3-candidate-" . get_date() . "/g" if ($id3 =~ m/\S/); 89 83 90 # the above generates a list of regex. Have a \D (non-digit) prefixed to the value to be substituted, else 84 91 # Greenstone-documented-examples-2013.06.18.tar.gz gets changed to Greenstone-documented-examples-2013.06-candidate-<daterepeat of 2013.06.18>.18.tar.gz … … 128 135 129 136 #always rename the log not to clash with other files on puka 130 $ENV{'munges'} = $ENV{'munges'} . " s/\ .out/-" . get_date() . "-" . $^O . "-log.txt/";137 $ENV{'munges'} = $ENV{'munges'} . " s/\\.out\$/-" . get_date() . "-" . $^O . "-log.txt/"; 131 138 132 139 #choose a snapshot ID
Note:
See TracChangeset
for help on using the changeset viewer.