summaryrefslogtreecommitdiff
path: root/IkiWiki/Setup.pm
blob: 560bc798bf4cd03da85e16eeb97aeed4d72125a5 (plain)
  1. #!/usr/bin/perl
  2. use warnings;
  3. use strict;
  4. use IkiWiki;
  5. use open qw{:utf8 :std};
  6. package IkiWiki;
  7. sub setup () { # {{{
  8. my $setup=possibly_foolish_untaint($config{setup});
  9. delete $config{setup};
  10. open (IN, $setup) || error(sprintf(gettext("cannot read %s: %s"), $setup, $!));
  11. my $code;
  12. {
  13. local $/=undef;
  14. $code=<IN>;
  15. }
  16. ($code)=$code=~/(.*)/s;
  17. close IN;
  18. eval $code;
  19. error($@) if $@;
  20. exit;
  21. } #}}}
  22. 1