diff options
author | chivorotkiv <shmakov@omich.net> | 2015-05-10 11:14:56 +0600 |
---|---|---|
committer | chivorotkiv <shmakov@omich.net> | 2015-05-10 11:14:56 +0600 |
commit | 9393a4d0d7b3edc24eea30882f49172bf1d37b88 (patch) | |
tree | 1f32e046ec3af1f27ac253cd814bd5196362ada0 /GitAutoDeploy.py | |
parent | 949b8cf489a9b5e7192b314a42a37509a347ea50 (diff) | |
parent | 72f40fc96e50452b5fa1201c2e5dbf03f84e891e (diff) | |
download | Git-Auto-Deploy-9393a4d0d7b3edc24eea30882f49172bf1d37b88.zip Git-Auto-Deploy-9393a4d0d7b3edc24eea30882f49172bf1d37b88.tar.gz Git-Auto-Deploy-9393a4d0d7b3edc24eea30882f49172bf1d37b88.tar.bz2 |
Merge branch 'clone' into lock
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 555b0d2..6a6afc8 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) |