- createrepo --update ${rdir}
- if test -f ${rdir}/repodata/repomd.xml.asc; then
- rm ${rdir}/repodata/repomd.xml.asc
+ echo "Section ${rdir}"
+ if test -d $rdir && ls -A $rdir; then
+ createrepo --update ${rdir}
+ if test -f ${rdir}/repodata/repomd.xml.asc; then
+ rm ${rdir}/repodata/repomd.xml.asc
+ fi
+ gpg --detach-sign -u "Index Data" --armor ${rdir}/repodata/repomd.xml
+ else
+ echo "Empty."