#! /bin/bash

dir="x86_64"

rpms=""
for f in "$dir/"*.rpm ; do
    if rpm -qip "$f" | grep -q '^Signature *:.*\(none\)'; then
	rpms="$rpms $f"
    fi
done
if [ -n "$rpms" ]; then
#    rpmsign --resign --define '_gpg_name Yate RAN Products' $rpms
	rpmsign --resign  $rpms
fi

genhdlist2 --clean --xml-info "$dir"
