aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2014-04-09 00:50:13 +0800
committerantoine <antoine@FreeBSD.org>2014-04-09 00:50:13 +0800
commit1237e57e6b0c5d643aaca5784ab257f657846e28 (patch)
tree4d98ebe04455f6c37dbc9e298169145309c3cc1a /Mk
parent91cde523ed8b70f4eaff736119681bf6c0c458c0 (diff)
downloadfreebsd-ports-gnome-1237e57e6b0c5d643aaca5784ab257f657846e28.tar.gz
freebsd-ports-gnome-1237e57e6b0c5d643aaca5784ab257f657846e28.tar.zst
freebsd-ports-gnome-1237e57e6b0c5d643aaca5784ab257f657846e28.zip
Rewrite the sharedmimeinfo qa check so that it doesn't produce a false
positive on misc/shared-mime-info With help from: bdrewery With hat: portmgr
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Scripts/qa.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh
index 5e73c45336a3..172079809439 100644
--- a/Mk/Scripts/qa.sh
+++ b/Mk/Scripts/qa.sh
@@ -114,11 +114,18 @@ desktopfileutils() {
}
sharedmimeinfo() {
- if [ -z "${USESSHAREDMIMEINFO}" ]; then
- find ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml ! -name "freedesktop\.org\.xml" -quit 2>/dev/null &&
+ local f found
+
+ found=0
+ for f in ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml; do
+ [ "${f}" = "${STAGEDIR}${PREFIX}/share/mime/packages/*.xml" ] && break #no matches
+ [ "${f}" = "${STAGEDIR}${PREFIX}/share/mime/packages/freedesktop.org.xml" ] && continue
+ found=1
+ break
+ done
+ if [ -z "${USESSHAREDMIMEINFO}" -a ${found} -eq 1 ]; then
warn "you need USES=shared-mime-info"
- else
- find ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml ! -name "freedesktop\.org\.xml" -quit 2>/dev/null ||
+ elif [ -n "${USESSHAREDMIMEINFO}" -a ${found} -eq 0 ]; then
warn "you may not need USES=shared-mime-info"
fi
return 0