ikiwiki/ikiwiki-w3m.cgi
joey 1bdfa4d8b5 * Support a w3mmode, which lets w3m run ikiwiki using its local CGI
support, to edit pages etc without a web server.
2006-07-07 21:00:48 +00:00

15 lines
381 B
Perl
Executable file

#!/usr/bin/perl
# ikiwiki w3m cgi meta-wrapper
if (! exists $ENV{PATH_INFO} || ! length $ENV{PATH_INFO}) {
die "PATH_INFO should be set";
}
my $path=$ENV{PATH_INFO};
$path=~s!/!!g;
$path="$ENV{HOME}/.ikiwiki/wrappers/$path";
if (! -x $path) {
print "Content-type: text/html\n\n";
print "Cannot find ikiwiki wrapper: $path\n";
exit 1;
}
exec $path;
die "$path: exec error: $!";