diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2001-05-27 05:37:12 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2001-05-27 05:37:12 +0000 |
commit | 62767a8f1d05e635fabb6733ed7f630d56353557 (patch) | |
tree | b89ea8b4d8ce61d659ae219e6d4b31c78f0a49b7 /net/p5-File-Rsync/files/patch-makepm.PL | |
parent | Perl5 interface to the MD2 message digest algorithm (diff) |
Perl convenience wrapper for the rsync(1) program
PR: ports/27484
Submitted by: Pete Fritchman <petef@databits.net>
Notes
Notes:
svn path=/head/; revision=43102
Diffstat (limited to 'net/p5-File-Rsync/files/patch-makepm.PL')
-rw-r--r-- | net/p5-File-Rsync/files/patch-makepm.PL | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/net/p5-File-Rsync/files/patch-makepm.PL b/net/p5-File-Rsync/files/patch-makepm.PL new file mode 100644 index 000000000000..d08ec52455be --- /dev/null +++ b/net/p5-File-Rsync/files/patch-makepm.PL @@ -0,0 +1,38 @@ +--- makepm.PL.orig Sun May 20 10:23:34 2001 ++++ makepm.PL Sun May 20 10:30:05 2001 +@@ -1,32 +1,8 @@ + # makepm.PL -- Builds Rsync.pm from Rsync.in. -*- perl -*- +-sub find_rsync { +- my @dirs = map { s/^$/./; $_ } split (':', $ENV{PATH}); +- push (@dirs, qw(/usr/local/bin /usr/bin /opt/bin)); +- for my $dir (@dirs) { +- next unless -d $dir; +- next unless -x "$dir/rsync"; +- return "$dir/rsync"; +- } +-} + $|=1; +-$RSYNC=&find_rsync; +-print <<'EOT'; +- +-File::Rsync needs to know the path to the rsync binary. This path is encoded +-in the installed module as the default path to rsync (it can be overridden +-at runtime). Please enter the full path to the rsync program or just hit +-Enter if the guess is correct. (If you always want the module to depend on +-the $PATH environment variable at runtime, just set the path to 'rsync' +-(this is not recommended)). +- +-EOT +-$RSYNC||='/usr/local/bin/rsync'; +-print "Path to rsync [$RSYNC]: "; +-my $ans=<STDIN>; +-chomp $ans; +-$RSYNC=$ans || $RSYNC; +-$RSYNC=~s/\\/\\\\/g; +-$RSYNC=~s/\'/\\\'/g; ++$PREFIX=@ARGV[0]; ++$RSYNC=$PREFIX . "/rsync"; ++print "Path to rsync [$RSYNC]"; + open IN,'Config.in' or die "Cannot read Config.in: $!\n"; + open OUT,'>Config.pm' or die "Cannot write Config.pm: $!\n"; + while (<IN>) { |