Merge pull request #20 from Espasant3/main

Solved a issue of instalation related to symlink and enhanced update experience with zsync
This commit is contained in:
mr. m 2025-03-13 19:51:43 +01:00 committed by GitHub
commit d56be04fd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -162,11 +162,11 @@ process_appimage() {
"${appimage_path}" --appimage-extract "${appimage_path}" --appimage-extract
# Move .desktop file (from /squashfs-root only) # Move .desktop file (from /squashfs-root only)
desktop_file=$(find squashfs-root -maxdepth 1 -name "*.desktop" | head -n 1) desktop_file=$(find -L squashfs-root -maxdepth 1 -name "*.desktop" | head -n 1)
mv "${desktop_file}" ~/.local/share/applications/${app_name}.desktop mv "${desktop_file}" ~/.local/share/applications/${app_name}.desktop
# Find PNG icon (from /squashfs-root only) # Find PNG icon (from /squashfs-root only)
icon_file=$(find squashfs-root -maxdepth 1 -name "*.png" | head -n 1) icon_file=$(find -L squashfs-root -maxdepth 1 -name "*.png" | head -n 1)
# Resolve symlink if the icon is a symlink # Resolve symlink if the icon is a symlink
if [ -L "${icon_file}" ]; then if [ -L "${icon_file}" ]; then
@ -247,7 +247,11 @@ check_for_updates() {
appimage_url="$ZEN_STABLE" appimage_url="$ZEN_STABLE"
fi fi
zsync_file="${HOME}/Downloads/$file_base.AppImage.zsync" # Get the download directory using xdg-user-dir, using Downloads as default value
DOWNLOAD_DIR=$(xdg-user-dir DOWNLOAD || echo "${HOME}/Downloads")
# Set zsync file path
zsync_file="${DOWNLOAD_DIR}/${file_base}.AppImage.zsync"
if check_installation_status "$file_base"; then if check_installation_status "$file_base"; then
log_info "Checking for updates..." log_info "Checking for updates..."