3 # -*- perl -*- vim: ft=perl sw=4 sts=4
5 # This purpose of this script is to let enscript decide how to highlight a
6 # file when called by cvsweb, despite cvsweb's retarded insistance on making
7 # the decision itself. Presumably, it can be adapted to work with viewcvs as
8 # well, which has the same problem.
10 # To use it, first tell cvsweb in cvsweb.conf to use this script for enscript:
11 # $CMD{enscript} = search_path('enscript.pl');
13 # Then, to the contents of %enscript_types, add
15 # which forces cvsweb to always call enscript.pl.
19 for(my $i=0;$i<=$#ARGV;$i++) {
20 $ARGV[$i] = "--highlight" if $ARGV[$i] =~ m/^--highlight= *$/;
23 exec "/usr/bin/enscript", @ARGV;