diff options
Diffstat (limited to 'community/pcb/pcb.install')
-rw-r--r-- | community/pcb/pcb.install | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/community/pcb/pcb.install b/community/pcb/pcb.install new file mode 100644 index 000000000..62ce80440 --- /dev/null +++ b/community/pcb/pcb.install @@ -0,0 +1,37 @@ +infodir=/usr/share/info +filelist=(pcb.info pcb.info-1 pcb.info-2) + +post_install() { + if [ -x /usr/bin/update-mime-database ]; then + echo Updating mime database... + /usr/bin/update-mime-database /usr/share/mime + fi + if [ -x /usr/bin/update-desktop-database ]; then + echo Updating desktop database.. + /usr/bin/update-desktop-database /usr/share/applications + fi + if [ -x /usr/bin/install-info ]; then + echo Updating info directory... + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done + fi + /usr/bin/gtk-update-icon-cache -f -t /usr/share/icons/hicolor +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + if [ -x /usr/bin/install-info ]; then + echo Updating info directory... + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done + fi +} + +post_remove() { + /usr/bin/gtk-update-icon-cache -f -t /usr/share/icons/hicolor +} |