summaryrefslogtreecommitdiff
path: root/IkiWiki/Setup.pm
blob: 40ed788624a16ba5f38413e74be6802f7fb1ad5f (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