summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Setup/Automator.pm24
-rw-r--r--debian/changelog4
2 files changed, 17 insertions, 11 deletions
diff --git a/IkiWiki/Setup/Automator.pm b/IkiWiki/Setup/Automator.pm
index 9fee4dcb7..9da594e99 100644
--- a/IkiWiki/Setup/Automator.pm
+++ b/IkiWiki/Setup/Automator.pm
@@ -40,17 +40,19 @@ sub import (@) {
my $this=shift;
IkiWiki::Setup::merge({@_});
- # Avoid overwriting any existing files.
- foreach my $key (qw{srcdir destdir repository dumpsetup}) {
- next unless exists $config{$key};
- my $add="";
- my $dir=IkiWiki::dirname($config{$key})."/";
- my $base=IkiWiki::basename($config{$key});
- while (-e $dir.$add.$base) {
- $add=1 if ! $add;
- $add++;
+ if (! $config{force_overwrite}) {
+ # Avoid overwriting any existing files.
+ foreach my $key (qw{srcdir destdir repository dumpsetup}) {
+ next unless exists $config{$key};
+ my $add="";
+ my $dir=IkiWiki::dirname($config{$key})."/";
+ my $base=IkiWiki::basename($config{$key});
+ while (-e $dir.$add.$base) {
+ $add=1 if ! $add;
+ $add++;
+ }
+ $config{$key}=$dir.$add.$base;
}
- $config{$key}=$dir.$add.$base;
}
# Set up wrapper
@@ -142,7 +144,7 @@ sub import (@) {
# Create admin user(s).
foreach my $admin (@{$config{adminuser}}) {
- next if $admin=~/^http\?:\/\//; # openid
+ next if defined IkiWiki::openiduser($admin);
# Prompt for password w/o echo.
my ($password, $password2);
diff --git a/debian/changelog b/debian/changelog
index 1960a1226..832bbaa85 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,10 @@ ikiwiki (3.20100213) UNRELEASED; urgency=low
* Rebuild wikis on upgrade to this version to get the comment counts
added to existing pages.
* Loosen regexp, to allow empty quoted parameters in directives.
+ * Add force_overwrite setting to make setup automator overwrite existing
+ files/directories.
+ * Fix admin openid detection in setup automator, and avoid prompting
+ for a password.
-- Joey Hess <joeyh@debian.org> Sun, 14 Feb 2010 17:02:10 -0500