pkgname=lat post_install() { scrolls=(`pacman -Ql $pkgname | grep 'share/omf/.*\.omf$' | awk '{ print $2 }'`) for scroll in "${scrolls[@]}" ; do scrollkeeper-install -q -p var/lib/scrollkeeper "$scroll" done } pre_upgrade() { pre_remove $1 } post_upgrade() { post_install $1 } pre_remove() { scrolls=(`pacman -Ql $pkgname | grep 'share/omf/.*\.omf$' | awk '{ print $2 }'`) for scroll in "${scrolls[@]}" ; do scrollkeeper-uninstall -q -p var/lib/scrollkeeper "$scroll" done } op=$1 shift $op $*