mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-17 06:47:17 +00:00
Estimated hours taken: 2 bootcheck, binary, linear: Link to absolute, not relative path names, since relative path names do not work back across symbolic links. binary, linear: Allow the user to give an initial list of suspects. assemble, binary, linear: Allow negative searches, i.e. searches in which the base version is the bad version and we want to see which module "fixes" the problem caused by the other modules, as opposed to normal searches in which we are looking for the module that introduces the problem.
35 lines
820 B
Bash
Executable File
35 lines
820 B
Bash
Executable File
#!/bin/sh
|
|
# Assemble a C source file from its component parts.
|
|
# The parts are stage2.{$base,$trial}/$testeddir/$module.c.part.{1,2,...$count}.
|
|
# Assemble uses the parts from stage2.$trial for the parts whose numbers are
|
|
# listed in $tested, and the parts from stage2.$base for the other parts.
|
|
# The patchwork file will be put in stage2/$testeddir/$module.c.
|
|
|
|
if test $# -le 5
|
|
then
|
|
echo "Usage: assemble base trial testeddir module count testedparts ..."
|
|
exit 1
|
|
fi
|
|
|
|
base="$1"
|
|
trial="$2"
|
|
testeddir="$3"
|
|
module="$4"
|
|
cnt="$5"
|
|
shift; shift; shift; shift; shift
|
|
tested="$@"
|
|
|
|
cat /dev/null > stage2/$testeddir/$module.c
|
|
i=0
|
|
while test $i -le $cnt
|
|
do
|
|
if appears $i $tested
|
|
then
|
|
which="$trial"
|
|
else
|
|
which="$base"
|
|
fi
|
|
cat stage2.$which/$testeddir/$module.c.part.$i >> stage2/$testeddir/$module.c
|
|
i=`expr $i + 1`
|
|
done
|