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