#!/bin/sh
files_exist()
{
    [ -e "$1" ]
}

if files_exist $REPOCOP_PKG_ROOT/usr/share/mime/packages/*.xml; then
   if rpmquery --scripts -p $REPOCOP_PKG | grep update-mime-database >/dev/null; then
       exec repocop-test-ok
   else
       exec repocop-test-fail "missing %post:%update_mimedb  %postun:%clean_mimedb in %post/un scripts: are required to install shared mime info properly."
   fi
else
   exec repocop-test-skip 
fi
