Besides age, check for presence of symlink from RPM Packages
directory.
for arch in $architectures; do
mkdir -p $d/${arch}/Packages
for f in $distdir/RPMS/${arch}/*.rpm $distdir/RPMS/noarch/*.rpm; do
+ b=`basename $f`
if test -f $f; then
+ mustsign=false
age=`stat --printf='%Y' $f`
if expr $now - $age \< $signage >/dev/null; then
+ mustsign=true
+ fi
+ if test ! -f $d/${arch}/Packages/$b; then
+ mustsign=true
+ fi
+ if $mustsign; then
ln -sf $f $d/${arch}/Packages/
if rpm -K $f|grep -q ' gpg' >/dev/null; then
echo "Already signed $f"