blob: 76fac4bfdda646ac9a084ea1d7d9e41b1f0737bf (
plain)
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
|
#! /bin/sh
# $Id: difftest.sh 798 2007-07-24 16:01:09Z bengardner $
#
# Copies the files for a test from results/ to output/
#
if [ -z "$1" ] ; then
fn=$(basename $0)
echo "Usage: $fn TEST [...]"
echo
echo " TEST : the test number pattern, may contain wildcards"
echo " You can put multiple test numbers on the command line"
echo
echo "The script will find all matching tests in the results folder and copy them"
echo "into the output folder."
echo
echo "Examples:"
echo "$fn 30014 # copy test 30014"
echo "$fn 30014 00110 # copy tests 30014 and 00110"
echo "$fn '*' # copy all tests"
exit 1
fi
while [ -n "$1" ] ; do
# Use '*' as the pattern if one wasn't defined
patt=$1
path="results"
# Find the tests that match, remove the .svn folders
files=$(find $path -name "$patt-*" -type f | sed "/\.svn/d")
did1=''
for t in $files ; do
other=$(echo $t | sed "s/^results/output/")
echo "cp $t $other"
cp $t $other
done
shift 1
done
|