From 5f143fdeb7a3529227550036ee41684fac3092c0 Mon Sep 17 00:00:00 2001 From: Marcus Minhorst Date: Mon, 4 May 2026 22:38:37 -0400 Subject: [PATCH 1/3] Fix broken dependancy check (set -e conflicted with the multiline test) --- appdir-lint.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) mode change 100644 => 100755 appdir-lint.sh diff --git a/appdir-lint.sh b/appdir-lint.sh old mode 100644 new mode 100755 index fac57a35..4bf01000 --- a/appdir-lint.sh +++ b/appdir-lint.sh @@ -17,8 +17,7 @@ warn () { echo "WARNING: $1" } -which desktop-file-validate >/dev/null -if [ ! $? -eq 0 ] ; then +if ! which desktop-file-validate >/dev/null; then fatal "desktop-file-validate is missing, please install it" fi From 240aa77d79ddfe4c533396ee7d40ff8f0142dcf5 Mon Sep 17 00:00:00 2001 From: Marcus Minhorst Date: Mon, 4 May 2026 22:42:39 -0400 Subject: [PATCH 2/3] Add mimetype as dependancy --- appdir-lint.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/appdir-lint.sh b/appdir-lint.sh index 4bf01000..f2e598ab 100755 --- a/appdir-lint.sh +++ b/appdir-lint.sh @@ -17,9 +17,14 @@ warn () { echo "WARNING: $1" } -if ! which desktop-file-validate >/dev/null; 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 if [ ! -e "${HERE}/excludelist" ] ; then fatal "excludelist missing, please install it" From 00ebb1a2f400b4267f8bed448a12c32b318f25a7 Mon Sep 17 00:00:00 2001 From: Marcus Minhorst Date: Mon, 4 May 2026 22:45:15 -0400 Subject: [PATCH 3/3] Converted appstreamcli from optional dep to mandatory --- appdir-lint.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/appdir-lint.sh b/appdir-lint.sh index f2e598ab..b4b01403 100755 --- a/appdir-lint.sh +++ b/appdir-lint.sh @@ -25,6 +25,7 @@ depends () { depends desktop-file-validate depends mimetype +depends appstreamcli if [ ! -e "${HERE}/excludelist" ] ; then fatal "excludelist missing, please install it" @@ -134,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