#!/bin/bash # Flathub retired org.mozilla.Thunderbird in favor of org.mozilla.thunderbird_esr, # and flatpak update moves existing installs over itself. A skip-packages entry # for the old ID would no longer keep Thunderbird from being installed, so # carry it over to the new one. SKIP_PACKAGES="$HOME/.config/coredesktop/skip-packages" [ -f "$SKIP_PACKAGES" ] || exit 0 grep -qE '^org\.mozilla\.Thunderbird([[:space:]]|$)' "$SKIP_PACKAGES" || exit 0 grep -qE '^org\.mozilla\.thunderbird_esr([[:space:]]|$)' "$SKIP_PACKAGES" && exit 0 # Start a new line if the file doesn't end with one [ -n "$(tail -c 1 "$SKIP_PACKAGES")" ] && echo >> "$SKIP_PACKAGES" echo "org.mozilla.thunderbird_esr" >> "$SKIP_PACKAGES"