#!/bin/csh
# This is: 
#  http://www.berklix.org/~jhs/src/bsd/fixes/FreeBSD/packages/to_pkg_install.sh
# See Also:
#  ./to_make_as_no_package
#  ./to_pkg_install_local
#  ./to_pkg_install_maybe
#  ./to_pkg_install_servers
#  ./to_reimport_into_ports
#  http://www.berklix.org/~jhs/bin/.sh/pkgs
#  man pkg-install
#   -f, --force Force the reinstallation of the package if already installed.
#   -y, --yes   Assume yes when asked for confirmation before package

foreach i ( \
	`grep -v \# \
	  ~/public_html/src/bsd/fixes/FreeBSD/packages/to_pkg_install_local \
	| awk -F: '{print $1;}' | sort | uniq` )
	# field seperator of :
	# 2nd optional field is discardable comment eg /usr/ports/
	# or names of packages that needs it, etc.
	# 'uniq' is cos I may have repeated identical first field package
	# name, for multiple dependencies.
	echo
	echo "$0 $1 Doing $i"
	xs pkg install --force --yes $i
	# echo "Starting sleep so you can suspend & elsewhere install."
	# sleep 2
	end
