Add TRUSTED_CONFIG_PREFIX_FILE option
[exim.git] / test / patchexim
1 #! /usr/bin/perl -w
2
3 # $Cambridge: exim/test/patchexim,v 1.2 2007/06/29 09:20:37 ph10 Exp $
4
5 ###############################################################################
6 # This is an auxiliary script that is part of the Exim test suite. It must be #
7 # run as root, and is normally called from the main controlling script. Its   #
8 # job is to make a copy of Exim, suitably patched so that it can run in the   #
9 # test harness. See further comments in the main script.                      #
10 #                                                                             #
11 # The only argument to this script is the name of the Exim binary that is to  #
12 # be copied. The script must be run in the correct current directory.         #
13 ###############################################################################
14
15 open(IN, "$ARGV[0]") || die "** Failed to open $ARGV[0]: $!\n";
16 open(OUT, ">eximdir/exim") || die "** Failed to open eximdir/exim: $!\n";
17
18 while(<IN>)
19   {
20   s/>>>running<<</<<<testing>>>/;
21   s/(\d+\.\d+(?:\.\d+)?(-RC\d+|-dev)?\0<<eximversion>>)/"x.yz\0" . ("*" x (length($1) - 5))/e;
22   print OUT;
23   }
24
25 close(IN);
26 close(OUT);
27
28 chmod 04755, "eximdir/exim";
29
30 # End of patchexim script