diff options
author | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-05-04 21:31:50 -0700 |
---|---|---|
committer | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-05-04 21:31:50 -0700 |
commit | 7d9e7b8c44c116ab4310231e7adfa7bd80543aa0 (patch) | |
tree | b44520745adb6758f77f0013ce1374a17c2f4357 /libpiny | |
parent | 49d6d1ccee5263e854224eddb5a010bb7c8c14f5 (diff) | |
parent | 4277b3c43a3c8a491974b99ae31e64b8e3c47fb6 (diff) | |
download | piny-code-7d9e7b8c44c116ab4310231e7adfa7bd80543aa0.tar.gz piny-code-7d9e7b8c44c116ab4310231e7adfa7bd80543aa0.zip |
Merge branch 'master' of ssh://piny/srv/git/piny-code
Diffstat (limited to 'libpiny')
-rw-r--r-- | libpiny/lib/Piny/Config.pm | 2 | ||||
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/libpiny/lib/Piny/Config.pm b/libpiny/lib/Piny/Config.pm index a715024..ef18541 100644 --- a/libpiny/lib/Piny/Config.pm +++ b/libpiny/lib/Piny/Config.pm @@ -209,7 +209,7 @@ sub tweakable { # The tweakables # Global tweakables, which only make sense in the global config file. -tweakable "piny_newuseremail" => "jrayhawk\@omgwallhack.org", 'Str'; +tweakable "piny_adminemail" => "jrayhawk\@omgwallhack.org", 'Str'; # Repo-specific tweakables, in the repos' .git/config files. tweakable "piny_ikiwikidestdir" => "/srv/www/piny.be/", 'PathDir'; diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index be363bd..cfe7b1d 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -225,8 +225,10 @@ sub rebuild { my $ikiuser = Piny::User::IkiWiki->new( "name" => "iki-" . $s->shortname ); foreach( "git-daemon-export-ok", "packed-refs" ) { - open( TOUCH, ">", $s->path . "/" . $_ ) or die "Could not touch $_ for repo: $!"; - close( TOUCH ); + unless( -e $s->path . "/" . $_ ) { + open( TOUCH, ">", $s->path . "/" . $_ ) or die "Could not touch $_ for repo: $!"; + close( TOUCH ); + }; }; foreach( "info", "logs", "branches" ) { @@ -393,8 +395,10 @@ sub create { system( "/usr/bin/git", "init", "--template=/srv/git-template.git", "--quiet", "--shared" ) and die "Could not initialize git repo!"; foreach( "git-daemon-export-ok", "packed-refs" ) { - open( TOUCH, ">", $repo->path . "/" . $_ ) or die "Could not touch $_ for repo: $!"; - close( TOUCH ); + unless( -e $repo->path . "/" . $_ ) { + open( TOUCH, ">", $repo->path . "/" . $_ ) or die "Could not touch $_ for repo: $!"; + close( TOUCH ); + }; }; foreach( "info", "logs" ) { |