diff options
author | jrayhawk+piny.be@omgwallhack.org <jrayhawk+piny.be@omgwallhack.org> | 2011-04-27 19:14:29 -0700 |
---|---|---|
committer | jrayhawk+piny.be@omgwallhack.org <jrayhawk+piny.be@omgwallhack.org> | 2011-04-27 19:14:29 -0700 |
commit | abf9510070afe050a897ca23c5e0ca56bbb78568 (patch) | |
tree | cf7699e3e7447c8203f68f222b3328d540ffd255 /libpiny/lib | |
parent | b3e1b1478f86ceaa76e1c67ef4c25cc285508886 (diff) | |
download | piny-code-abf9510070afe050a897ca23c5e0ca56bbb78568.tar.gz piny-code-abf9510070afe050a897ca23c5e0ca56bbb78568.zip |
rebuildrepo: remove old ikiwiki state
Diffstat (limited to 'libpiny/lib')
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index b2fbd2d..be363bd 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -249,6 +249,8 @@ sub rebuild { system( "/usr/bin/git", "clone", "--quiet", $s->path, $s->ikiwiki_srcdir ) and die "Could not clone repo to ikiwiki srcdir!"; }; + system( "/usr/bin/find " . $s->ikiwiki_srcdir . " -type d -name .ikiwiki -print0 | xargs -0 --no-run-if-empty rm -r") and die "Could not remove old Ikiwiki state dir!"; + foreach( $s->ikiwiki_srcdir, $s->ikiwiki_destdir, $s->secure_path ) { unless( -d $_ ) { mkdir( $_ ) }; system( "/bin/chown", "-R", $ikiuser->name . ".", $_ ) and die "Could not change ownership of ikiwiki directories!"; |