diff options
Diffstat (limited to 'qa/check-group')
-rwxr-xr-x | qa/check-group | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/qa/check-group b/qa/check-group new file mode 100755 index 0000000..9558423 --- /dev/null +++ b/qa/check-group @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check group file and qa scripts for a specific pcp command ($1) +# +# $1 is assumed to be _both_ the name of a command that appears in +# the QA scripts (or part of a command, e.g. purify in _setup_purify) +# and the name of a group in the group file +# + +tmp=/var/tmp/$$ +trap "rm -f $tmp.*; exit 0" 0 1 2 3 15 + +if [ $# -ne 1 ] +then + echo "Usage: $0 pcp-app" + exit 1 +fi + +for seq in [0-9][0-9]*[0-9] +do + ( grep -v '^#' $seq \ + | egrep -q "(^$1([ \'\"]|$))|([ /\'\"_]$1([ \'\"_]|$))" ) && echo $seq >>$tmp.tmp +done + +sort -o $tmp.scripts $tmp.tmp + +check -r -n -g "$1" | sort \ +| while read f +do + [ -f "$f" ] && echo "$f" +done >$tmp.group + +comm -23 $tmp.scripts $tmp.group >$tmp.tmp +if [ -s $tmp.tmp ] +then + echo "$1 in QA scripts and NOT in group ..." + sort -n $tmp.tmp | sed -e 's/^/ /' + echo +fi + +comm -13 $tmp.scripts $tmp.group >$tmp.tmp +if [ -s $tmp.tmp ] +then + echo "$1 in group and NOT in QA scripts ..." + sort -n $tmp.tmp | sed -e 's/^/ /' +fi + +comm -12 $tmp.scripts $tmp.group >$tmp.tmp +echo "$1 in group and QA scripts `wc -l <$tmp.tmp | sed -e 's/ //g'` times" |