#!/bin/sh -e

if ! [ "$RPM_INSTALL_ARG1" -ge 0 ] 2>/dev/null; then
	echo "uninstall_info: invalid or undefined variable: RPM_INSTALL_ARG1" >&2
	exit 1
fi

[ "$RPM_INSTALL_ARG1" -eq 0 ] || exit 0
for f in "$@"; do
	if [ "$f" = "${f#/}" ]; then
		f="/usr/share/info/$f"
	fi
	/sbin/install-info --delete --dir-file="${f%/*}/dir" --info-file="$f" ||:
done
