nextcloud: launch if up to date

This commit is contained in:
Jörn-Michael Miehe 2025-11-08 17:12:16 +01:00
parent 9fab880db1
commit 13f1bec42b

View file

@ -1,6 +1,6 @@
#!/bin/sh
INSTALL_DIR="/path/to/nextcloud-client"
INSTALL_DIR="/home/jmm/opt/apps/nextcloud-client"
# name: nextcloud-appimage-launch
# summary: Downloads and launches the latest Nextcloud (desktop) AppImage
@ -30,11 +30,7 @@ version_installed="$( \
| grep -Eo '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' \
)"
if [ "${version_available}" = "${version_installed}" ]; then
echo "nextcloud is up to date!" >&2
exit 0
fi
if [ "${version_available}" != "${version_installed}" ]; then
echo "new nextcloud version available: ${version_available}" >&2
notify-send \
--app-name "Nextcloud" \
@ -48,5 +44,6 @@ curl --silent --show-error --fail --location \
chmod +x "${INSTALL_DIR}/Nextcloud-${version_available}-x86_64.AppImage"
ln -sf "./Nextcloud-${version_available}-x86_64.AppImage" "${INSTALL_DIR}/current"
fi
exec "${INSTALL_DIR}/current" --background "${@}"