#!/bin/sh
#
# Check archives ...
#

tmp=/var/tmp/c-a-$$
trap "rm -f $tmp.*; exit 0" 0 1 2 3 15

if [ $# -eq 0 ]
then
    set -- *meta*
fi

for arch
do
    git ls-files "$arch" >$tmp.out
    if [ -s $tmp.out ]
    then
	if pmlogcheck -w "$arch" >$tmp.out 2>&1
	then
	    :
	else
	    echo `echo "$arch" | sed -e 's/.meta.*//'`: bad
	    cat $tmp.out
	fi
    else
	echo "$arch: warning: not checked into git, not checked"
    fi

done
