Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions openstan.desktop

This file was deleted.

14 changes: 14 additions & 0 deletions packaging/post-uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
#!/bin/sh
# Post-uninstall script for openstan RPM/DEB package.
# Removes the .desktop entry and icon, then refreshes caches.
#
# On upgrade the new package's post-install.sh runs first, then this script
# runs as part of removing the old package. If any openstan-* versioned
# directory still exists under /usr/lib, we are mid-upgrade and must not
# tear down desktop integration — the new version handles that.

set -e

# If another openstan version directory exists with a valid binary,
# this is an upgrade — skip cleanup. The new package's post-install.sh
# will handle desktop integration.
for _d in /usr/lib/openstan-*; do
if [ -d "$_d/openstan" ] && [ -x "$_d/openstan/openstan" ]; then
exit 0
fi
done

rm -f /usr/bin/openstan
rm -f /usr/share/applications/openstan.desktop
rm -f /usr/share/icons/hicolor/scalable/apps/openstan.svg
Expand Down