summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjrayhawk+piny.be@omgwallhack.org <jrayhawk+piny.be@omgwallhack.org>2011-04-20 22:37:34 -0700
committerjrayhawk+piny.be@omgwallhack.org <jrayhawk+piny.be@omgwallhack.org>2011-04-20 22:37:34 -0700
commit43e46e947e0fda3e768302354e29d004da4a061b (patch)
treec227954e2fc168029c39a8f83bfb6cf337372597
parentd7a522d4e85c88b9f8068b9d0a0ede271b382295 (diff)
downloadpiny-code-43e46e947e0fda3e768302354e29d004da4a061b.tar.gz
piny-code-43e46e947e0fda3e768302354e29d004da4a061b.zip
Fix rebuildrepo to work with existing Ikiwiki directories.
-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( $_ ) };