Permalink
Browse files

Fix upload tool to automatically create directories.

  • Loading branch information...
1 parent da5562c commit a1ccd554bdb86df8f07a9a1503cdc9e2a8ddf739 @fperez fperez committed Dec 14, 2011
Showing with 5 additions and 2 deletions.
  1. +2 −1 tools/testupload
  2. +3 −1 tools/toollib.py
View
@@ -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)
View
@@ -15,7 +15,9 @@
# 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):

0 comments on commit a1ccd55

Please sign in to comment.