summaryrefslogtreecommitdiff
path: root/IkiWiki/Setup.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Setup.pm')
-rw-r--r--IkiWiki/Setup.pm22
1 files changed, 22 insertions, 0 deletions
diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm
new file mode 100644
index 000000000..63659ce2e
--- /dev/null
+++ b/IkiWiki/Setup.pm
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+package IkiWiki;
+
+sub setup () { # {{{
+ my $setup=possibly_foolish_untaint($config{setup});
+ delete $config{setup};
+ open (IN, $setup) || error("read $setup: $!\n");
+ local $/=undef;
+ my $code=<IN>;
+ ($code)=$code=~/(.*)/s;
+ close IN;
+
+ eval $code;
+ error($@) if $@;
+ exit;
+} #}}}
+
+1