fixed some path and scaling issues
This commit is contained in:
parent
0a1ced15d0
commit
e523ceccc1
1 changed files with 7 additions and 1 deletions
|
@ -37,14 +37,20 @@ if __name__ == '__main__':
|
|||
allargs = [thearg]
|
||||
elif basecmd in ('scp'):
|
||||
thearg = ' '.join(allargs[1:])
|
||||
firstLetter = allargs[2][0]
|
||||
secondLetter = allargs[2][1]
|
||||
uploadTarget = "/srv/web/releases/%s/%s/%s/" % (firstLetter, secondLetter, allargs[2])
|
||||
if thearg.find('/') != -1:
|
||||
print "scp yourfile-1.2.tar.gz scm.fedorahosted.org:$YOURPROJECT # No trailing /"
|
||||
sys.exit(4)
|
||||
elif not os.path.isdir(uploadTarget):
|
||||
print "http://fedorahosted.org/releases/%s/%s/%s does not exist!" % (firstLetter, secondLetter, allargs[2])
|
||||
sys.exit(5)
|
||||
else:
|
||||
newargs = []
|
||||
newargs.append(allargs[0])
|
||||
newargs.append(allargs[1])
|
||||
newargs.append("/srv/web/releases/%s/" % allargs[2])
|
||||
newargs.append(uploadTarget)
|
||||
os.execv(cmd, [cmd] + newargs[1:])
|
||||
sys.exit(1)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue