summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpiny/lib/Piny/Repo.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm
index 7818463..cfa73bd 100644
--- a/libpiny/lib/Piny/Repo.pm
+++ b/libpiny/lib/Piny/Repo.pm
@@ -237,7 +237,9 @@ sub rebuild {
print SETUP $s->ikiwiki_setup;
close( SETUP ) or die "Could not close new ikiwiki setup file: $!";
- system( "/usr/bin/git", "clone", "--quiet", $s->path, $s->ikiwiki_srcdir ) and die "Could not clone repo to ikiwiki srcdir!";
+ unless( -d $s->ikiwiki_srcdir ) {
+ system( "/usr/bin/git", "clone", "--quiet", $s->path, $s->ikiwiki_srcdir ) and die "Could not clone repo to ikiwiki srcdir!";
+ };
foreach( $ikiuser->name, $s->ikiwiki_srcdir, $s->ikiwiki_destdir, $s->secure_path ) {
unless( -d $_ ) { mkdir( $_ ) };