Changeset 1985
- Timestamp:
- 12/13/07 11:00:55 (5 months ago)
- Files:
-
- swish_website/bin/swish-daily.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
swish_website/bin/swish-daily.pl
r1984 r1985 67 67 [ \&make_install, 'Run make install' ], 68 68 [ \&make_dist, "Run make dist and move tarball to $config{tardir}" ], 69 [ \&make_src_rpm, "Build swish-e .src.rpm " ],69 [ \&make_src_rpm, "Build swish-e .src.rpm and move it to $config{tardir}" ], 70 70 [ \&set_symlink, "Make symlink $config{symlink} point to $config{day_dir}" ], 71 71 [ \&remove_day_dir, "Remove old install and build directories" ], … … 223 223 224 224 log_message( "new .src.rpm build in $rpmbuilddir/SRPMS" ); 225 226 # now move the .src.rpm to the tardir 227 run_command( "mv $rpmbuilddir/SRPMS/swish-e-*.src.rpm $c->{tardir}" ); 225 228 } 226 229 … … 336 339 337 340 # purge old ones 338 purge_old_tarballs ( $c ) if $c->{remove};341 purge_old_tarballs_and_srpms( $c ) if $c->{remove}; 339 342 340 343 return 1; 341 344 } 342 345 343 sub purge_old_tarballs {346 sub purge_old_tarballs_and_srpms { 344 347 my $c = shift; 345 348 opendir( DIR, $c->{tardir} ) || die "Failed to open tardir: $!"; … … 350 353 my @deletes; 351 354 while ( my $file = readdir( DIR ) ) { 352 next unless $file =~ /^swish-e.*\.tar\.gz$/;355 next unless ($file =~ /^swish-e.*\.tar\.gz$/ || $file =~/^swish-e.*\.src\.rpm$/); 353 356 next if (stat "$c->{tardir}/$file")[9] > $old; 354 357 push @deletes, "$c->{tardir}/$file"; … … 357 360 358 361 for ( @deletes ) { 362 my ($type) = ($_ =~ /tar\.gz$/ ? "tar" : "srpm"); 359 363 print unlink( $_ ) 360 ? "Deleted old tarfile '$_'\n"361 : "Failed to delete old tar'$_': $!\n";364 ? "Deleted old $type file '$_'\n" 365 : "Failed to delete old $type '$_': $!\n"; 362 366 } 363 367
