require IkiWiki::Wrapper;
if ($installed) {
- $IkiWiki::program_to_wrap = 'ikiwiki.out';
+ $IkiWiki::program_to_wrap = `which ikiwiki`;
}
else {
- $IkiWiki::program_to_wrap = `which ikiwiki`;
+ $IkiWiki::program_to_wrap = './ikiwiki.out';
}
# XXX substitute its interpreter to Makefile's $(PERL)
# XXX best solution: do this to all scripts during build
}
sub _wrapper_paths {
- return qq{newenviron[i++]="PERL5LIB=$ENV{PERL5LIB}";};
+ return qq{addenv("PERL5LIB", "$ENV{PERL5LIB}");};
}