App-DistSync
view release on metacpan or search on metacpan
{
"abstract" : "Utility synchronization of the mirror distribution-sites",
"author" : [
"Serz Minus (Sergey Lepenkov) <abalama@cpan.org>"
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
---
abstract: 'Utility synchronization of the mirror distribution-sites'
author:
- 'Serz Minus (Sergey Lepenkov) <abalama@cpan.org>'
build_requires:
ExtUtils::MakeMaker: '6.6'
Test::More: '0.94'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001'
license: perl
bin/distsync view on Meta::CPAN
#!/usr/bin/perl -w
# $Id: distsync 27 2019-07-23 11:26:37Z abalama $
use strict;
=head1 NAME
distsync - launcher of synchronization via App::DistSync
=head1 SYNOPSIS
distsync [options] [commands]
distsync -D /var/www/dist init
distsync [-d] -D /var/www/dist [-T TIMEOUT] [sync]
=head1 OPTIONS
bin/distsync view on Meta::CPAN
Initializing the mirror in the specified directory
=item B<sync>
Synchronization of the specified directory with the remote resources (mirrors)
=back
=head1 DESCRIPTION
Launcher of synchronization via App::DistSync
See L<App::DistSync> for details
=head1 AUTHOR
Serz Minus (Sergey Lepenkov) L<http://www.serzik.com> E<lt>abalama@cpan.orgE<gt>
=head1 COPYRIGHT
Copyright (C) 1998-2019 D&D Corporation. All Rights Reserved
lib/App/DistSync.pm view on Meta::CPAN
package App::DistSync; # $Id: DistSync.pm 27 2019-07-23 11:26:37Z abalama $
use warnings;
use strict;
use utf8;
=encoding utf-8
=head1 NAME
App::DistSync - Utility synchronization of the mirror distribution-sites
=head1 VERSION
Version 1.06
=head1 SYNOPSIS
use App::DistSync;
my $ds = new App::DistSync(
dir => "/var/www/www.example.com/dist",
pid => $$,
);
$ds->init or die ("Initialization error");
$ds->sync or die ("Sync error");
=head1 DESCRIPTION
Utility synchronization of the mirror distribution-sites
=head2 METHODS
=over 4
=item new
my $ds = new App::DistSync(
dir => "/var/www/www.example.com/dist",
pid => $$,
lib/App/DistSync.pm view on Meta::CPAN
sub init { # Initialization
my $self = shift;
my $stamp = scalar(localtime($self->{stamp}));
# MANIFEST.SKIP
touch($self->{file_maniskip}) or return 0;
if (-e $self->{file_maniskip} && -z $self->{file_maniskip}) {
open FILE, ">", $self->{file_maniskip} or return 0;
printf FILE join("\n",
"# Generated on %s",
"# List of files that should not be synchronized",
"#",
"# Format of file:",
"#",
"# dir1/dir2/.../dirn/foo.txt any comment, for example blah-blah-blah",
"# bar.txt any comment, for example blah-blah-blah",
"# baz.txt",
"# 'spaced dir1/foo.txt' any comment, for example blah-blah-blah",
"# 'spaced dir1/foo.txt' any comment, for example blah-blah-blah",
"# !!perl/regexp (?i-xsm:\\.bak\$) avoid all bak files",
"#",
( run in 1.038 second using v1.01-cache-2.11-cpan-05444aca049 )