Followup fix for
bug 454594 (need a makefile target that can upload files via ssh). r=bsmedberg, NPOB
--- a/build/upload.py
+++ b/build/upload.py
@@ -165,21 +165,22 @@ def UploadFiles(user, host, path, files,
DoSSHCommand('%s "%s" %s' % (post_upload_command, path, file_list), user, host, port=port, ssh_key=ssh_key)
if verbose:
print "Upload complete"
if __name__ == '__main__':
host = RequireEnvironmentVariable('UPLOAD_HOST')
user = RequireEnvironmentVariable('UPLOAD_USER')
path = RequireEnvironmentVariable('UPLOAD_PATH')
- if sys.platform == 'win32':
- path = FixupMsysPath(path)
port = int(OptionalEnvironmentVariable('UPLOAD_PORT'))
key = OptionalEnvironmentVariable('UPLOAD_SSH_KEY')
post_upload_command = OptionalEnvironmentVariable('POST_UPLOAD_CMD')
+ if sys.platform == 'win32':
+ path = FixupMsysPath(path)
+ post_upload_command = FixupMsysPath(post_upload_command)
parser = OptionParser(usage="usage: %prog [options] <files>")
parser.add_option("-b", "--base-path",
action="store", dest="base_path",
help="Preserve file paths relative to this path when uploading. If unset, all files will be uploaded directly to UPLOAD_PATH.")
(options, args) = parser.parse_args()
if len(args) < 1:
print "You must specify at least one file to upload"