From a1ccd554bdb86df8f07a9a1503cdc9e2a8ddf739 2011-12-14 04:24:25 From: Fernando Perez Date: 2011-12-14 04:24:25 Subject: [PATCH] Fix upload tool to automatically create directories. --- diff --git a/tools/testupload b/tools/testupload index dd95512..77adbe7 100755 --- a/tools/testupload +++ b/tools/testupload @@ -17,5 +17,6 @@ testing_site = '%s/testing/%s' % (archive, version) cd(distdir) -# FIXME: this assumes the path *with the version number* exists on the server +# Create remote path if it doesn't exist. +sh('ssh %s "mkdir -p %s/testing/%s" ' % (archive_user, archive_dir, version)) sh('scp * %s' % testing_site) diff --git a/tools/toollib.py b/tools/toollib.py index f811b80..0396204 100644 --- a/tools/toollib.py +++ b/tools/toollib.py @@ -15,7 +15,9 @@ cd = os.chdir # Constants # SSH root address of the archive site -archive = 'ipython@archive.ipython.org:archive.ipython.org' +archive_user = 'ipython@archive.ipython.org' +archive_dir = 'archive.ipython.org' +archive = '%s:%s' % (archive_user, archive_dir) # Utility functions def sh(cmd):