summaryrefslogtreecommitdiff
path: root/IkiWiki/Setup.pm
blob: 2b4c76bd0b228539cb94feb69fba97435fff9833 (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("read $setup: $!\n");
  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