fix(desktop): supersede the legacy linux packages on upgrade (#2842)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-19 18:50:37 +02:00
1 parent cc75e1318d
commit 98a42f612b
4 files changed
+278 -7

No files matched your search

@@ -0,0 +1,21 @@
#!/bin/bash
if [ ! -e '/opt/${sanitizedProductName}/${executable}' ]; then
if type update-alternatives >/dev/null 2>&1; then
update-alternatives --remove '${executable}' '/opt/${sanitizedProductName}/${executable}'
else
rm -f '/usr/bin/${executable}'
fi
fi
if [ "$1" = 0 ]; then
APPARMOR_PROFILE_DEST='/etc/apparmor.d/${executable}'
if [ -f "$APPARMOR_PROFILE_DEST" ]; then
if apparmor_status --enabled > /dev/null 2>&1; then
if ! { [ -x '/usr/bin/ischroot' ] && /usr/bin/ischroot; } && hash apparmor_parser 2>/dev/null; then
apparmor_parser --remove "$APPARMOR_PROFILE_DEST" || true
fi
fi
rm -f "$APPARMOR_PROFILE_DEST"
fi
fi
@@ -0,0 +1,10 @@
#!/bin/bash
LEGACY_DIR='/opt/Fluxer Canary'
if [ -d "$LEGACY_DIR" ]; then
if [ -z "$(find "$LEGACY_DIR" ! -type d -print -quit 2>/dev/null)" ]; then
find "$LEGACY_DIR" -depth -type d -exec rmdir {} + >/dev/null 2>&1 || true
fi
fi
exit 0