option d : show debug info
option t : timeout in seconds (default $timeout)
argument url :
- rysnc://host.dom.com/module/file
+ rsync://host.dom.com/module/file
http://host.dom.com/some/file
ftp://host.dom.com/some/file
USAGE
# handle ftp/http urls with wget
if ( $url =~ m!^rsync://(.*)$! )
- { my $dst = $1 ;
+ { my $src = $1 ;
+ my $dst = $src ;
$dst =~ s![/\s]!_!g ;
my $TMP = "$tmp_dir/$dst" ;
+ $src =~ s!/!::! ;
unlink $TMP ; # ignore status
- my $cmd = "$RSYNC $opt_v $opt_q --no-motd --timeout $timeout $url $TMP" ;
+ my $cmd = "$RSYNC $opt_v $opt_q --no-motd --timeout $timeout $src $TMP" ;
Warn sprintf "'%s'\n", $cmd if $opt{d} ;
system $cmd ;
if ( open TMP, $TMP )