#!/bin/sh
#
# run desktop-file-validate on ding.desktop
#
# (c) 2018 Roland Rosenfeld <roland@debian.org>

if [ -z "$AUTOPKGTEST_TMP" ]; then
    AUTOPKGTEST_TMP=$(mktemp -d)
fi

trap 'rm -rf $AUTOPKGTEST_TMP' EXIT

OUTPUT=$AUTOPKGTEST_TMP/desktop-file-validate.out

#desktop-file-validate /usr/share/applications/ding.desktop > $OUTPUT
desktop-file-validate ding.desktop > "$OUTPUT"

if [ -s "$OUTPUT" ]
then
    echo "desktop-file-validate failed on ding.desktop:"
    cat "$OUTPUT"
    exit 1
else
    exit 0
fi
