--- embedaddon/rsync/packaging/nightly-rsync 2012/02/17 15:09:30 1.1.1.1 +++ embedaddon/rsync/packaging/nightly-rsync 2016/11/01 09:54:32 1.1.1.2 @@ -16,6 +16,7 @@ use Date::Format; # Where the local copy of /home/ftp/pub/rsync/dev/nightly should be updated. our $dest = $ENV{HOME} . '/samba-rsync-ftp/dev/nightly'; +our $samba_host = $ENV{SAMBA_HOST} || 'samba.org'; our $nightly_symlink = "$dest/rsync-HEAD.tar.gz"; our($make_tar, $upload, $help_opt); @@ -39,8 +40,8 @@ if ($make_tar) { open(IN, '-|', 'git status') or die $!; my $status = join('', ); close IN; - die "The checkout is not clean:\n", $status unless $status =~ /\nnothing to commit \(working directory clean\)/; - die "The checkout is not on the master branch.\n" unless $status =~ /^# On branch master\n/; + die "The checkout is not clean:\n", $status unless $status =~ /\nnothing to commit.+working directory clean/; + die "The checkout is not on the master branch.\n" unless $status =~ /^(?:# )?On branch master\n/; system "make $gen_target" and die "make $gen_target failed!\n"; my @extra_files; @@ -59,13 +60,13 @@ if ($make_tar) { my $confversion; open(IN, '<', 'configure.ac') or die "Unable to open configure.ac: $!\n"; while () { - if (/^RSYNC_VERSION=(.*)/) { + if (/^AC_INIT\(\[rsync\],\s*\[(\d.+?)\]/) { $confversion = $1; last; } } close IN; - die "Unable to find RSYNC_VERSION in configure.ac\n" unless defined $confversion; + die "Unable to find AC_INIT with version in configure.ac\n" unless defined $confversion; open(IN, '<', 'OLDNEWS') or die "Unable to open OLDNEWS: $!\n"; $_ = ; @@ -156,7 +157,7 @@ if ($upload) { if (defined $ENV{RSYNC_PARTIAL_DIR}) { $opt = " -f 'R $ENV{RSYNC_PARTIAL_DIR}'"; } - system "rsync$opt -aviHP --delete-after . samba.org:/home/ftp/pub/rsync/dev/nightly"; + system "rsync$opt -aviHP --delete-after . $samba_host\:/home/ftp/pub/rsync/dev/nightly"; } exit;