3 # cp_testcase <src_num> <dest_scripts_dir> <dest_num>
4 # Run using the test/ dir as current-working-directory.
5 # Include leading zeroes in the testcase numbers.
7 srcnum="${1:?missing src testcase number}"
8 dstdir="${2:?missing dest scripts dir}"
9 dstnum="${3:? missing dest testcase number}"
11 if [ -f confs/$dstnum -o -f scripts/*/$dstnum ]
13 echo "testcase $dstnun already exists?" >&2
18 cp scripts/*/$srcnum $dstdir/$dstnum
19 git add $dstdir/$dstnum
21 for d in confs log rejectlog paniclog stdin stderr
23 if [ -f "$d/$srcnum" ]
25 cp "$d/$srcnum" "$d/$dstnum"
30 for d in mail aux-fixed aux-var-src
38 cp $f ${dstnum}${suff}
39 git add ${dstnum}${suff}
45 rm -f aux-var/$srcnum*