Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Stifler6996/apt-mirror.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apt-mirror')
-rwxr-xr-xapt-mirror8
1 files changed, 8 insertions, 0 deletions
diff --git a/apt-mirror b/apt-mirror
index ecd11f0..bd5310f 100755
--- a/apt-mirror
+++ b/apt-mirror
@@ -108,6 +108,7 @@ my %config_variables = (
"_contents" => 1,
"_autoclean" => 0,
"_tilde" => 0,
+ "_plus" => 0,
"limit_rate" => '100m',
"run_postmirror" => 1,
"auth_no_challenge" => 0,
@@ -339,6 +340,7 @@ while (<CONFIG>)
$link =~ s[^(\w+)://][];
$link =~ s[/$][];
$link =~ s[~][%7E]g if get_variable("_tilde");
+ $link =~ s[\+][%2B]g if get_variable("_plus");
if ( $config_line{'type'} eq "skip-clean" ) {
$skipclean{ $link } = 1;
} elsif ( $config_line{'type'} eq "clean" ) {
@@ -381,6 +383,7 @@ sub remove_double_slashes
while (s[(?<!:)//][/]g) { }
while (s[(?<!:/)/[^/]+/\.\./][/]g) { }
s/~/\%7E/g if get_variable("_tilde");
+ s/\+/\%2B/g if get_variable("_plus");
return $_;
}
@@ -478,6 +481,7 @@ foreach ( keys %urls_to_download )
{
s[^(\w+)://][];
s[~][%7E]g if get_variable("_tilde");
+ s[\+][%2B]g if get_variable("_plus");
$skipclean{$_} = 1;
$skipclean{$_} = 1 if s[\.gz$][];
$skipclean{$_} = 1 if s[\.bz2$][];
@@ -497,6 +501,7 @@ sub sanitise_uri
$uri =~ s/^([^@]+)?@?// if (split '/',$uri)[0] =~ /@/;
$uri =~ s&:\d+/&/&; # and port information
$uri =~ s/~/\%7E/g if get_variable("_tilde");
+ $uri =~ s/\+/\%2B/g if get_variable("_plus");
return $uri;
}
@@ -637,6 +642,7 @@ foreach ( keys %urls_to_download )
{
s[^(\w+)://][];
s[~][%7E]g if get_variable("_tilde");
+ s[\+][%2B]g if get_variable("_plus");
$skipclean{$_} = 1;
}
@@ -728,6 +734,7 @@ foreach ( keys %urls_to_download )
{
s[^(\w+)://][];
s[~][%7E]g if get_variable("_tilde");
+ s[\+][%2B]g if get_variable("_plus");
$skipclean{$_} = 1;
}
@@ -971,6 +978,7 @@ sub process_file
{
my $file = shift;
$file =~ s[~][%7E]g if get_variable("_tilde");
+ $file =~ s[\+][%2B]g if get_variable("_plus");
return 1 if $skipclean{$file};
push @rm_files, sanitise_uri($file);
my ( undef, undef, undef, undef, undef, undef, undef, $size, undef, undef, undef, undef, $blocks ) = stat($file);