Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/ftp/mirror/files/patch-mirror.pl
16462 views
1
--- mirror.pl.orig Mon Jun 8 12:55:27 1998
2
+++ mirror.pl Tue Jun 1 16:24:17 2004
3
@@ -104,7 +104,7 @@
4
# Try to find the default location of various programs via
5
# the users PATH then using $extra_path
6
if( ! $on_win ){
7
- $extra_path = '/usr/local/bin:/usr/new/bin:/usr/public/bin:/usr/ucb:/usr/bin:/bin:/etc:/usr/etc:/usr/local/etc';
8
+ $extra_path = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin';
9
}
10
if( $extra_path ne '' ){
11
$ENV{ 'PATH' } .= $path_sep . $extra_path;
12
@@ -159,19 +159,20 @@
13
$rm_prog = &find_prog( 'rm' );
14
15
# Generate checksums
16
-$sum_prog = &find_prog( 'sum' );
17
+$sum_prog = &find_prog( 'md5' );
18
19
# SPECIAL NOTE: This is eval'd, so DONT put double-quotes (") in it.
20
# You can get local variables to appear as in the second example:
21
-$mail_subject = '-s \'mirror update\'';
22
-# $mail_subject = ' -s \'mirror update of $package\'';
23
+# $mail_subject = '-s \'mirror update\'';
24
+$mail_subject = ' -s \'mirror update of $package\'';
25
26
# When scanning the local directory, how often to prod the remote
27
# system to keep the connection alive
28
$prod_interval = 60;
29
30
# Put the directory that mirror is actually in at the start of PERLLIB.
31
-$dir = &real_dir_from_path( $0 );
32
+# $dir = &real_dir_from_path( $0 );
33
+$dir = "/usr/local/lib/mirror";
34
unshift( @INC, $dir );
35
36
# Debian GNU/Linux stores mirror.defaults in /etc/mirror
37
@@ -1322,8 +1323,11 @@
38
39
# Create a get_patt from the contents of the local directory
40
if( $update_local && $#get_top >= 0 ){
41
- $get_patt = '^' . join( '|^', @get_top );
42
- $get_patt =~ s/$squished//g;
43
+ my ($path,$re,@re_patt);
44
+ #$get_patt = '^' . join( '|^', @get_top );
45
+ #$get_patt =~ s/$squished//g;
46
+ foreach $path ( @get_top ) { push @re_patt, "\^\Q$path\E\$"; }
47
+ $get_patt= join( '|', @re_patt );
48
&msg( "get_patt = $get_patt\n" ) if $debug;
49
}
50
51
52