Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions appdir-lint.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ warn () {
echo "WARNING: $1"
}

which desktop-file-validate >/dev/null
if [ ! $? -eq 0 ] ; then
fatal "desktop-file-validate is missing, please install it"
fi
depends () {
if ! which "$1" >/dev/null; then
fatal "$1 is missing, please install it"
fi
}

depends desktop-file-validate
depends mimetype
depends appstreamcli

if [ ! -e "${HERE}/excludelist" ] ; then
fatal "excludelist missing, please install it"
Expand Down Expand Up @@ -130,11 +135,7 @@ fi
if [ -z "$APPDATA" ] ; then
warn 'No appdata file present. Please provide one in the AppImage as per the instructions on https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps'
else
if [ ! -z $(which appstreamcli) ] ; then
appstreamcli validate-tree "${APPDIR}"
else
echo "Skipping AppStream validation since appstreamcli is not on the \$PATH"
fi
appstreamcli validate-tree "${APPDIR}"
fi


Expand Down