2006-03-23 07:51:15 +01:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
use warnings;
|
|
|
|
use strict;
|
2006-05-02 08:53:33 +02:00
|
|
|
use IkiWiki;
|
2006-09-10 20:16:43 +02:00
|
|
|
use open qw{:utf8 :std};
|
2006-03-23 07:51:15 +01:00
|
|
|
|
|
|
|
package IkiWiki;
|
|
|
|
|
|
|
|
sub setup () { # {{{
|
|
|
|
my $setup=possibly_foolish_untaint($config{setup});
|
|
|
|
delete $config{setup};
|
2007-01-04 13:00:23 +01:00
|
|
|
#translators: The first parameter is a filename, and the second
|
|
|
|
#translators: is a (probably not translated) error message.
|
2006-12-29 05:38:40 +01:00
|
|
|
open (IN, $setup) || error(sprintf(gettext("cannot read %s: %s"), $setup, $!));
|
2006-03-24 03:42:19 +01:00
|
|
|
my $code;
|
|
|
|
{
|
|
|
|
local $/=undef;
|
|
|
|
$code=<IN>;
|
|
|
|
}
|
2006-03-23 07:51:15 +01:00
|
|
|
($code)=$code=~/(.*)/s;
|
|
|
|
close IN;
|
|
|
|
|
|
|
|
eval $code;
|
2007-11-17 20:06:11 +01:00
|
|
|
error("$setup: ".$@) if $@;
|
2006-03-26 07:08:41 +02:00
|
|
|
|
2006-03-23 07:51:15 +01:00
|
|
|
exit;
|
|
|
|
} #}}}
|
|
|
|
|
|
|
|
1
|