6 ###############################################################################
7 # This is an auxiliary script that is part of the Exim test suite. It must be #
8 # run as root, and is normally called from the main controlling script. Its #
9 # job is to make a copy of Exim, suitably patched so that it can run in the #
10 # test harness. See further comments in the main script. #
12 # The only argument to this script is the name of the Exim binary that is to #
13 # be copied. The script must be run in the correct current directory. #
14 ###############################################################################
16 open(IN
, $ARGV[0]) || die "** Failed to open $ARGV[0]: $!\n";
17 open(OUT
, '>eximdir/exim') || die "** Failed to open eximdir/exim: $!\n";
21 s/>>>running<<</<<<testing>>>/;
23 (\d
+\
.\d
+ # major.minor
24 (?
:[_
.]\d
+)?
# optional patchlevel
25 (?
:[_
-]RC\d
+|[_
-]?dev
(?
:start
)?
)?
# optional RC or dev(start)
26 (?
:(?
:[_
-]\d
+)?
# git tag distance
27 [-_
][[:xdigit
:]]+)?
# git id
28 (?
:[-_
]XX
)?\
0 # git dirty bit
29 <<eximversion>> # marker
32 {"x.yz\0" . ("*" x (length($1) - 5))}xe;
39 chmod 04755, 'eximdir/exim';
41 # End of patchexim script