cygport upload command?

Christopher Faylor
Tue Jul 8 04:53:00 GMT 2014

On Mon, Jul 07, 2014 at 09:14:29PM -0400, Andrew Schulman wrote:
>Using cygport, I think that packaging has become quite easy now.  At least,
>once the cygport script is built and working, updating a package to a new
>release is as easy as updating the version number in the cygport script,
>then running 'cygport ... download all'.
>Except for one thing: the upload step.  Maintainers still have to go
>through the procedure at
>  Although it's
>easier than the old manual upload process, it's still a little tedious and
>Yaakov, would you consider adding an 'upload' command to cygport, that
>would handle the uploading details?  That would take away the last bit of
>manual work in a routine package update.
>If you don't have the time or interest to add an upload command yourself,
>would you consider a patch?  I've spent some time looking through cygport
>code, and I might have time to give it a try, or maybe someone else would.

FWIW, this is the script that I use.  Obviously the path to the upload
directory would have to be changed.

-------------- next part --------------

use strict;
use Getopt::Long;

my $arch = 'all';

use constant {
    FTP => '/usr/bin/lftp'

my @arch = ();
if ($arch eq 'all') {
    @arch = ('x86', 'x86_64');
} else {
    @arch = $arch;

my $exit = 0;
for $arch (@arch) {
    # ftp -c 'connect s; cd x86/release; mirror -eRN2 mutt; put /dev/null -o !ready'
    chdir "/netrel/uploads/$arch" or die "$0: couldn't cd to /netrel/uploads/$arch - $!\n";
    for my $p (@ARGV) {
	print "Uploading $p($arch)...\n";
	my $res = system FTP, '-c', "connect sftp://cygwin:\; cd $arch/release; mirror -eR $p; put /dev/null -o !ready";
	$exit ||= $res;
	if (!$res) {
	    print "done\n";
	} else {
	    warn "$0: $p upload failed\n" if $res;
exit $exit;

More information about the Cygwin-apps mailing list