[Bps-public-commit] r17745 - in Shipwright/trunk: lib/Shipwright/Script
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Jan 14 11:24:14 EST 2009
Author: sunnavy
Date: Wed Jan 14 11:24:13 2009
New Revision: 17745
Modified:
Shipwright/trunk/ (props changed)
Shipwright/trunk/lib/Shipwright/Script/Update.pm
Log:
r18782 at sunnavys-mb: sunnavy | 2009-01-15 00:23:46 +0800
relocate to new_source if it is applied
Modified: Shipwright/trunk/lib/Shipwright/Script/Update.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Update.pm (original)
+++ Shipwright/trunk/lib/Shipwright/Script/Update.pm Wed Jan 14 11:24:13 2009
@@ -32,7 +32,6 @@
sub run {
my $self = shift;
- my $name = shift;
$shipwright = Shipwright->new( repository => $self->repository, );
@@ -44,6 +43,23 @@
}
else {
+ my $name = shift;
+ my $new_source = shift;
+ if ($new_source) {
+ system(
+ "$0 relocate -r "
+ . $self->repository
+ . (
+ $self->log_level ? ( " --log-level " . $self->log_level )
+ : ''
+ )
+ . (
+ $self->log_file ? ( " --log-file " . $self->log_file )
+ : ''
+ )
+ . " $name $new_source"
+ ) && die "relocate $name to $new_source failed: $!";
+ }
confess "need name arg\n" unless $name || $self->all;
@@ -180,7 +196,7 @@
=head1 SYNOPSIS
update --all
- update NAME [--follow]
+ update NAME [NEW_SOURCE_URL] [--follow]
update --builder
update --utility
More information about the Bps-public-commit
mailing list