Changeset 21797 for other-projects/nightly-tasks
- Timestamp:
- 2010-03-16T17:23:20+13:00 (14 years ago)
- Location:
- other-projects/nightly-tasks/snapshot/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/snapshot/trunk/lib.pl
r21774 r21797 92 92 } 93 93 94 if ( ! -d "$release_dir/products" ) {95 die "error: products directory doesn't exist, exiting. (Well, not that exciting, a bit of a downer really...)";96 }97 98 94 #copy products to a temporary folder, giving them their new names 99 95 if ( ! -d "$release_dir/uploads" ) { … … 102 98 mkdir "$release_dir/uploads"; 103 99 104 @files = <$release_dir/products/*>; 100 my @files; 101 if ( -d "$release_dir/products" ) { 102 @files = <$release_dir/products/*>; 103 } 104 105 105 push( @files, "$release_dir/$rk.out" ); 106 106 for my $file ( @files ) { … … 115 115 system( "cp '$file' '$release_dir/uploads/$filename'" ); 116 116 } 117 my $command = "cd $release_dir/uploads && tar -c z* | ";117 my $command = "cd $release_dir/uploads && tar -c * | "; 118 118 $command .= ($^O eq "MSWin32" ? "putty" : "ssh"); 119 119 $command .= " -i '$ENV{'IDENTITY_FILE'}' nzdl\@puka.cs.waikato.ac.nz"; 120 #system("$command");121 120 print "$command\n"; 121 system("$command"); 122 122 } -
other-projects/nightly-tasks/snapshot/trunk/task.pl
r21774 r21797 62 62 } 63 63 64 #keep wget/curl base command in a variable 65 my $httpRetrieve = $^O eq "darwin" ? "curl" : "wget -O -"; 66 64 67 #setup based on mode 65 68 if ( $ENV{'TASK_NAME'} =~ "caveat\$" ) { … … 67 70 68 71 if ( $major_version == 2 ) { 69 $ENV{'snapshot_id2'} = ` wget -O -http://www.greenstone.org/next-release.txt`;72 $ENV{'snapshot_id2'} = `$httpRetrieve http://www.greenstone.org/next-release.txt`; 70 73 chomp($ENV{'snapshot_id2'}); 71 74 } else { 72 $ENV{'snapshot_id3'} = ` wget -O -http://www.greenstone.org/next-release-greenstone3.txt`;75 $ENV{'snapshot_id3'} = `$httpRetrieve http://www.greenstone.org/next-release-greenstone3.txt`; 73 76 chomp($ENV{'snapshot_id3'}); 74 77 } … … 122 125 123 126 #always rename the log not to clash with other files on puka 124 $ENV{'munges'} = $ENV{'munges'} . " s/\.out/-" . get_date() . "- log.txt/";127 $ENV{'munges'} = $ENV{'munges'} . " s/\.out/-" . get_date() . "-" . $^O . "-log.txt/"; 125 128 126 129 #choose a snapshot ID
Note:
See TracChangeset
for help on using the changeset viewer.