#!/bin/sh # Checks the desktop file, the metainfo, and that the MIME and scheme entries are there. Validators run when present. cd "$(dirname "$0")/.." || exit 1 rc=0 grep -q 'x-scheme-handler/medlar' assets/medlar.desktop || { echo "scheme entry missing"; rc=1; } grep -q 'application/metalink' assets/medlar.desktop || { echo "metalink MIME entry missing"; rc=1; } if command -v desktop-file-validate >/dev/null; then desktop-file-validate assets/medlar.desktop || rc=1; else echo "desktop-file-validate not here"; fi if command -v appstreamcli >/dev/null; then appstreamcli validate --no-net assets/medlar.metainfo.xml || rc=1; else echo "appstreamcli not here"; fi exit $rc