# post_install: 在软件包安装后执行 post_install() { echo "Updating desktop database and icon cache..." xdg-icon-resource forceupdate --theme hicolor >/dev/null 2>&1 || true update-desktop-database -q >/dev/null 2>&1 || true echo "Barco tools installed to /opt/barco-tools." echo "You can launch applications from your application menu (Barco Commander, Communicator)." } # post_upgrade: 在软件包升级后执行 post_upgrade() { post_install "$1" } # post_remove: 在软件包删除后执行 post_remove() { echo "Updating desktop database and icon cache after removal..." xdg-icon-resource forceupdate --theme hicolor >/dev/null 2>&1 || true update-desktop-database -q >/dev/null 2>&1 || true } # vim:set ts=2 sw=2 et: