From e523ceccc1843f0ea5301a54e63d3df787c67bbf Mon Sep 17 00:00:00 2001 From: Michael Patrick McGrath Date: Tue, 29 Jan 2008 09:46:53 -0700 Subject: [PATCH] fixed some path and scaling issues --- scripts/run-scm/run-git | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/run-scm/run-git b/scripts/run-scm/run-git index 7496626..1ca5f86 100755 --- a/scripts/run-scm/run-git +++ b/scripts/run-scm/run-git @@ -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: