INFO_DIR=/usr/share/info INFO_FILES=(udunits2.info udunits2lib.info udunits2prog.info) post_install() { [ -x usr/bin/install-info ] || return 0 for file in ${INFO_FILES[@]}; do install-info \ $INFO_DIR/$file.gz $INFO_DIR/dir 2> /dev/null done } post_upgrade() { post_install $1 } pre_remove() { [ -x usr/bin/install-info ] || return 0 for file in ${INFO_FILES[@]}; do install-info --delete \ $INFO_DIR/$file.gz $INFO_DIR/dir 2> /dev/null done } op=$1 shift $op $*