/usr/lib/prayer/build_index.pl is in prayer-templates-dev 1.3.5-dfsg1-2+b1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #!/usr/bin/perl
#
# $Cambridge: hermes/src/prayer/templates/src/build_index.pl,v 1.4 2010/07/26 08:48:28 dpc22 Exp $
$prefix = shift(@ARGV);
$count = 0;
@templates = ();
foreach $i (@ARGV) {
if ($i =~ /(\S+)\.t/) {
push(@templates, $1);
} else {
push(@templates, $i);
}
$count++;
}
@ARGV = ();
@templates = sort(@templates);
print <<'EOM';
#include "misc.h"
#include "template_structs.h"
EOM
foreach $i (@templates) {
print "struct template _template_${prefix}_${i};\n";
}
print <<"EOM";
struct template_map template_map_${prefix}[] = {
EOM
foreach $i (@templates) {
print <<"EOM";
{ "${i}", &_template_${prefix}_${i} },
EOM
}
print <<"EOM";
{ NIL, NIL }
};
unsigned long template_map_${prefix}_count = ${count};
EOM
|