3 # Check group file and qa scripts for a specific pcp command ($1)
5 # $1 is assumed to be _both_ the name of a command that appears in
6 # the QA scripts (or part of a command, e.g. purify in _setup_purify)
7 # and the name of a group in the group file
11 trap "rm -f $tmp.*; exit 0" 0 1 2 3 15
15 echo "Usage: $0 pcp-app"
20 for seq in [0-9][0-9][0-9] [0-9][0-9][0-9][0-9]
22 if grep -q "^$seq[: ]" group
26 echo "$seq: Error: file exists but missing from group"
28 # special control lines
29 # check-group-include: group ..
30 # check-group-exclude: group ..
31 grep '# check-group-' $seq >$tmp.chk
34 if egrep "check-group-include:.* $1( |\$)" <$tmp.chk
>/dev
/null
36 #debug# echo "$seq: explicit include"
40 if egrep "check-group-exclude:.* $1( |\$)" <$tmp.chk
>/dev
/null
42 #debug# echo "$seq: explicit exclude"
47 |
egrep -q "(^$1([ \'\"]|$))|([ /\'\"_]$1([ \'\"_]|$))" ) && echo $seq >>$tmp.tmp
50 sed <group
-e '/^$/d' -e '/^[^0-9]/d' -e 's/[: ].*//' \
53 [ -f "$seq" ] && continue
54 echo "$seq: Error: in group but file not found"
57 sort -o $tmp.scripts
$tmp.tmp
59 check
-r -n -g "$1" |
sort \
62 [ -f "$f" ] && echo "$f"
65 comm -23 $tmp.scripts
$tmp.group
>$tmp.tmp
68 echo "$1 in QA scripts and NOT in group ..."
69 sort -n $tmp.tmp |
sed -e 's/^/ /'
73 comm -13 $tmp.scripts
$tmp.group
>$tmp.tmp
76 echo "$1 in group and NOT in QA scripts ..."
77 sort -n $tmp.tmp |
sed -e 's/^/ /'
80 comm -12 $tmp.scripts
$tmp.group
>$tmp.tmp
81 echo "$1 in group and QA scripts `wc -l <$tmp.tmp | sed -e 's/ //g'` times"