diff options
author | BuildTools | 2016-01-15 14:56:20 -0500 |
---|---|---|
committer | BuildTools | 2016-01-15 14:56:20 -0500 |
commit | 12a652f7d2ce907c72da964c1ef1708211118600 (patch) | |
tree | d3d0c2bc00b813ab166a763e4e5dd03442a075ce /pybliographer.install | |
download | aur-12a652f7d2ce907c72da964c1ef1708211118600.tar.gz |
Initial import
Diffstat (limited to 'pybliographer.install')
-rw-r--r-- | pybliographer.install | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pybliographer.install b/pybliographer.install new file mode 100644 index 000000000000..47d66526ba9b --- /dev/null +++ b/pybliographer.install @@ -0,0 +1,51 @@ +pkgname=pybliographer + +post_install() { + schemas=(`pacman -Ql $pkgname | grep 'gconf/schemas/.*schemas$' | awk '{ print $2 }'`) + scrolls=(`pacman -Ql $pkgname | grep 'share/omf/.*\.omf$' | awk '{ print $2 }'`) + + export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source` + for schema in "${schemas[@]}" ; do + usr/bin/gconftool-2 --makefile-install-rule "$schema" >/dev/null 2>&1 + done + + for scroll in "${scrolls[@]}" ; do + scrollkeeper-install -q -p var/lib/scrollkeeper "$scroll" + done + + kill -s HUP `pidof /usr/bin/gconfd-2` > /dev/null 2>&1 + update-desktop-database -q +} + +pre_upgrade() { + pre_remove $1 +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + schemas=(`pacman -Ql $pkgname | grep 'gconf/schemas/.*schemas$' | awk '{ print $2 }'`) + scrolls=(`pacman -Ql $pkgname | grep 'share/omf/.*\.omf$' | awk '{ print $2 }'`) + + export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source` + for schema in "${schemas[@]}" ; do + usr/bin/gconftool-2 --makefile-uninstall-rule "$schema" >/dev/null 2>&1 + done + + for scroll in "${scrolls[@]}" ; do + scrollkeeper-uninstall -q -p var/lib/scrollkeeper "$scroll" + done + + kill -s HUP `pidof /usr/bin/gconfd-2` >/dev/null 2>&1 +} + +post_remove() { + update-desktop-database -q +} + +op=$1 +shift + +$op $* |