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