viff

changeset 854:14811e1463a1

Give upload command a source and target.
author Martin Geisler <mg@daimi.au.dk>
date Sun, 27 Jul 2008 22:31:53 +0200
parents b5707c789a5a
children 28506572a2ca
files run.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/run.py	Sun Jul 27 22:17:15 2008 +0200
     1.2 +++ b/run.py	Sun Jul 27 22:31:53 2008 +0200
     1.3 @@ -179,12 +179,12 @@
     1.4      fp.close()
     1.5  
     1.6  
     1.7 -@command('upload', 'directory', 'key')
     1.8 -def upload(directory, key):
     1.9 -    """Upload directory to http://viff.dk/. This requires an SSH
    1.10 +@command('upload', 'source', 'target', 'key')
    1.11 +def upload(source, target, key):
    1.12 +    """Upload source to http://viff.dk/target. This requires an SSH
    1.13      private key that has access to viff.dk."""
    1.14 -    if not isdir(directory):
    1.15 -        abort("%s should be a directory", directory)
    1.16 +    if not isdir(source):
    1.17 +        abort("%s should be a directory", source)
    1.18      if not os.access(key, os.R_OK):
    1.19          abort("Cannot read %s", key)
    1.20  
    1.21 @@ -192,7 +192,7 @@
    1.22               '--human-readable', '--stats', '--verbose',
    1.23               '--chmod', 'go=rX',
    1.24               '-e', 'ssh -l viff -i %s' % key,
    1.25 -             directory, 'viff.dk:~/viff.dk/'])
    1.26 +             source, 'viff.dk:~/viff.dk/%s' % target])
    1.27  
    1.28  @command('size')
    1.29  def size():