} #}}}
sub checkconfig () { #{{{
- if (! defined $config{diffurl}) {
- $config{diffurl}="";
- }
if (defined $config{bzr_wrapper} && length $config{bzr_wrapper}) {
push @{$config{wrappers}}, {
wrapper => $config{bzr_wrapper},
# Skip source name in renames
$filename =~ s/^.* => //;
- my $diffurl = $config{'diffurl'};
+ my $diffurl = defined $config{'diffurl'} ? $config{'diffurl'} : "";
$diffurl =~ s/\[\[file\]\]/$filename/go;
$diffurl =~ s/\[\[file-id\]\]/$fileid/go;
$diffurl =~ s/\[\[r2\]\]/$info->{revno}/go;
} #}}}
sub checkconfig () { #{{{
- if (! defined $config{diffurl}) {
- $config{diffurl}="";
- }
if (! defined $config{gitorigin_branch}) {
$config{gitorigin_branch}="origin";
}
foreach my $detail (@{ $ci->{'details'} }) {
my $file = $detail->{'file'};
- my $diffurl = $config{'diffurl'};
+ my $diffurl = defined $config{'diffurl'} ? $config{'diffurl'} : "";
$diffurl =~ s/\[\[file\]\]/$file/go;
$diffurl =~ s/\[\[sha1_parent\]\]/$ci->{'parent'}/go;
$diffurl =~ s/\[\[sha1_from\]\]/$detail->{'sha1_from'}/go;
} #}}}
sub checkconfig () { #{{{
- if (! defined $config{diffurl}) {
- $config{diffurl}="";
- }
if (exists $config{mercurial_wrapper} && length $config{mercurial_wrapper}) {
push @{$config{wrappers}}, {
wrapper => $config{mercurial_wrapper},
}
foreach my $file (split / /,$info->{files}) {
- my $diffurl = $config{'diffurl'};
+ my $diffurl = defined $config{diffurl} ? $config{'diffurl'} : "";
$diffurl =~ s/\[\[file\]\]/$file/go;
$diffurl =~ s/\[\[r2\]\]/$info->{changeset}/go;
} #}}}
sub checkconfig () { #{{{
- if (! defined $config{diffurl}) {
- $config{diffurl}="";
- }
if (! defined $config{svnpath}) {
$config{svnpath}="trunk";
}
$file=$1;
}
- my $diffurl=$config{diffurl};
+ my $diffurl=defined $config{diffurl} ? $config{diffurl} : "";
$diffurl=~s/\[\[file\]\]/$file/g;
$diffurl=~s/\[\[r1\]\]/$rev - 1/eg;
$diffurl=~s/\[\[r2\]\]/$rev/g;
} #}}}
sub checkconfig () { #{{{
- if (! defined $config{diffurl}) {
- $config{diffurl}="";
- }
if (defined $config{tla_wrapper} && length $config{tla_wrapper}) {
push @{$config{wrappers}}, {
wrapper => $config{tla_wrapper},
my @pages;
foreach my $file (@paths) {
- my $diffurl=$config{diffurl};
+ my $diffurl=defined $config{diffurl} ? $config{diffurl} : "";
$diffurl=~s/\[\[file\]\]/$file/g;
$diffurl=~s/\[\[rev\]\]/$change/g;
push @pages, {
$(MAKE) -C po clean
extra_install:
+ install -d $(DESTDIR)/etc/ikiwiki
+ install -m 0644 wikilist $(DESTDIR)/etc/ikiwiki
+ install -m 0644 simple.setup $(DESTDIR)/etc/ikiwiki
+
install -d $(DESTDIR)$(PREFIX)/share/ikiwiki
for dir in `cd underlays && find . -follow -type d ! -regex '.*\.svn.*'`; do \
install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
dh_testroot
dh_clean -k
$(MAKE) pure_install DESTDIR=$(shell pwd)/debian/ikiwiki
- dh_install wikilist etc/ikiwiki
dh_installdocs html
dh_installexamples doc/examples/*
dh_link usr/share/common-licenses/GPL-2 usr/share/doc/ikiwiki/html/GPL
--- /dev/null
+#!/usr/bin/perl
+# Simple ikiwiki setup.
+#
+# This setup file causes ikiwiki to create a wiki, check it into revision
+# control, generate a setup file for the new wiki, and set everything up.
+#
+# Just run: ikiwiki -setup /etc/ikiwiki/simple.setup
+#
+# By default, it asks two questions, and confines itself to the user's home
+# directory. You can edit it to change what it asks questions about, or to
+# modify the values to use site-specific settings.
+
+require IkiWiki::Setup::Automator;
+
+our $wikiname=IkiWiki::Setup::Automator::ask(
+ "What will the wiki be named?", "wiki");
+our $rcs=IkiWiki::Setup::Automator::ask(
+ "What revision control system to use?", "git");
+
+IkiWiki::Setup::Automator::import(
+ wikiname => $wikiname,
+ rcs => $rcs,
+ srcdir => "$ENV{HOME}/$wikiname",
+ destdir => "$ENV{HOME}/public_html/$wikiname",
+ repository => "$ENV{HOME}/$wikiname.$rcs",
+ setupfile => "$ENV{HOME}/$wikiname.setup",
+);