[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

The install-info name conflict: a possible fix



Hi all,

	I got hold of the gnu install-info, and checked its command-line
arguments against those of dpkgs' install-info. From this, I've written a
shell script which tells from the command-line which install-info is
required. To use this, move the dpkg install_info to
/usr/bin/dinstall_info, and place the one that comes with texinfo as
/usr/bin/ginstall_info, with this as /usr/bin/install_info

If you like this, it could probably close #9771.

HTH,

Matthew



#! /bin/bash
# install_info.sh: checks command-line arguments for ones unique
# to either GNU install_info or dpkg install_info
# and calls the appropriate script,
# the Default being dpkg install_info
# This script Copyright C 1999 Matthew Vernon <matthew@debian.org>
# Released under the GPL version 2

a=$@   #shift would mangle this otherwise
gnu_install_info=/usr/bin/ginstall_info
dpkg_install_info=/usr/bin/dinstall_info

if [ $# -eq 1 ]
	then echo "Dpkg install-info to be used"
	exit 0
fi

while [ $1 ]
	do
case "$1" in

--dir-file=*|--entry=*|--delete|--info-file=*|--info-dir=*--item=*--section=*)
		echo "Using GNU install-info"
		$gnu_install_info $a
		exit 0
		;;

--section|--infodir=*|--align=*|--calign=*|--maxwidth=*|--description=*|--menuentry=*|--keep-old|--test)
		echo "Using Dpkg install-info"
		$dpkg_install_info $a
		exit 0
		;;
		*)
		;;
		esac
		shift
	done
echo "Unable to determine which install-info to use, defaulting to dpkg's version."
dpkg_install_info $a


Reply to: