void-packages/srcpkgs/xbps-triggers/files/pango-modules

46 lines
907 B
Bash
Executable File

#!/bin/sh
#
# This is a reduced version for the pango-modules trigger which is now
# obsolete upstream.
# The pango-modulesquery binary was removed from upstream and isn't provided
# anymore by our 'pango' package
#
# This reduced version just removes the pango.modules file if it exists during
# the removal of the 'pango' package
#
# Arguments: $ACTION = [run/targets]
# $TARGET = [post-remove]
# $PKGNAME
# $VERSION
# $UPDATE = [yes/no]
#
ACTION="$1"
TARGET="$2"
PKGNAME="$3"
VERSION="$4"
UPDATE="$5"
export PATH="$PATH:/usr/local/bin"
pango_modules=etc/pango/pango.modules
case "$ACTION" in
targets)
echo "post-remove"
;;
run)
if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "pango" ]; then
if [ -f ${pango_modules} ]; then
echo "Removing pango modules file..."
rm -f ${pango_modules}
fi
break
fi
;;
*)
exit 0
;;
esac
exit 0