releasing version 3.20110430
[ikiwiki.git] / ikiwiki-w3m.cgi
blobfd0b0d677f7d5c1f1935286b69a848bd42210a4b
1 #!/usr/bin/perl
2 # ikiwiki w3m cgi meta-wrapper
3 if (! exists $ENV{PATH_INFO} || ! length $ENV{PATH_INFO}) {
4 die "PATH_INFO should be set";
6 my $path=$ENV{PATH_INFO};
7 $path=~s!/!!g;
8 $path="$ENV{HOME}/.ikiwiki/wrappers/$path";
9 if (! -x $path) {
10 print "Content-type: text/html\n\n";
11 print "Cannot find ikiwiki wrapper: $path\n";
12 exit 1;
14 exec $path;
15 die "$path: exec error: $!";