|
|
|
@ -1,7 +1,8 @@
|
|
|
|
|
#!/usr/opkg/bin/perl |
|
|
|
|
|
|
|
|
|
# configure official upload URL |
|
|
|
|
# official upload parameters |
|
|
|
|
my $upload_url = "openpkg-upload\@download.openpkg.org:/"; |
|
|
|
|
my $upload_mode = "rsync"; |
|
|
|
|
|
|
|
|
|
# list of positional arguments |
|
|
|
|
my @spec = ( |
|
|
|
@ -46,9 +47,17 @@ system($cmd);
|
|
|
|
|
print STDOUT "\033[31m++ uploading source RPM package to OpenPKG download repository\033[0m\n"; |
|
|
|
|
print STDOUT "-- local: " . $info->{"source-rpm-file"} . "\n"; |
|
|
|
|
print STDOUT "-- remote: " . $upload_url . "\n"; |
|
|
|
|
my $cmd = "scp -o 'Compression no'"; |
|
|
|
|
$cmd .= " " . $info->{"source-rpm-file"}; |
|
|
|
|
$cmd .= " " . $upload_url; |
|
|
|
|
my $cmd; |
|
|
|
|
if ($upload_mode eq "rsync") { |
|
|
|
|
$cmd = "rsync --rsh=\"ssh -o 'Compression no'\" --partial --progress"; |
|
|
|
|
$cmd .= " " . $info->{"source-rpm-file"}; |
|
|
|
|
$cmd .= " " . $upload_url; |
|
|
|
|
} |
|
|
|
|
elsif ($upload_mode eq "scp") { |
|
|
|
|
$cmd = "scp -o 'Compression no'"; |
|
|
|
|
$cmd .= " " . $info->{"source-rpm-file"}; |
|
|
|
|
$cmd .= " " . $upload_url; |
|
|
|
|
} |
|
|
|
|
print STDOUT "\$ $cmd\n"; |
|
|
|
|
system($cmd); |
|
|
|
|
|
|
|
|
|