diff options
Diffstat (limited to 'GitAutoDeploy.py')
-rwxr-xr-x | GitAutoDeploy.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py index 1bc6ead..9f8b26e 100755 --- a/GitAutoDeploy.py +++ b/GitAutoDeploy.py @@ -31,7 +31,12 @@ class GitAutoDeploy(BaseHTTPRequestHandler): for repository in myClass.config['repositories']: if(not os.path.isdir(repository['path'])): print "Directory %s not found" % repository['path'] - sys.exit(2) + call(['git clone '+repository['url']+' '+repository['path']], shell=True) + if(not os.path.isdir(repository['path'])): + print "Unable to clone repository %s" % repository['url'] + sys.exit(2) + else: + print "Repository %s successfully cloned" % repository['url'] if(not os.path.isdir(repository['path'] + '/.git')): print "Directory %s is not a Git repository" % repository['path'] sys.exit(2) |