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