# $Copyright:	$
# Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
# Sequent Computer Systems, Inc.   All rights reserved.
#  
# This software is furnished under a license and may be used
# only in accordance with the terms of that license and with the
# inclusion of the above copyright notice.   This software may not
# be provided or otherwise made available to, or used by, any
# other person.  No title to or ownership of the software is
# hereby transferred.
#ident	"$Header: listpkg 1.4 89/10/10 $@(#)sadmin:admin/menu/softwaremgmt/listpkg	2.5"
#menu# list packages already installed
#help#
#help#	This subcommand shows you a list of currently installed software
#help#	packages.

unset c
if [ -d /usr/options ]
then
	cd /usr/options
	c=`ls */*.name 2>/dev/null  |  sed 's/\.name$//'`
	if [ -n "${c}" ]
	then
		echo '\n\tThe following software packages have been installed:\n'
		for i in ${c}
		do
			( echo "`basename ${i}`\t\c"; cat ${i}.name ) | pr -w79 -t -e9 -
		done
	fi
fi
if [ -z "${c}" ]
then
	echo '\n\tNo software packages have been installed.'
fi
echo ''
