3 # determine what directory this script is in, because the packages files
7 #determine which vbersion of ubuntu
8 VERSION
=`lsb_release -r | cut -f2 -d' '`
9 UBUNTU_PACKAGES
=$DIR/ubuntu.
$VERSION.packages
12 if [ ! -e $UBUNTU_PACKAGES ]; then
13 echo "WARNING! We strongly recommend an LTS release."
14 UBUNTU_PACKAGES
=$DIR/ubuntu.packages
16 echo "Using the $UBUNTU_PACKAGES file."
19 UBUNTU_PACKAGES_LIST
=`awk '{print $1}' $UBUNTU_PACKAGES | grep -v '^\s*#' | grep -v '^\s*$'`
20 for F
in $UBUNTU_PACKAGES_LIST; do
21 UBUNTU_PKG_POLICY
=`apt-cache policy $F 2> /dev/null | grep "Installed:"`
22 if [ "${#UBUNTU_PKG_POLICY}" -eq "0" ]; then
23 UBUNTU_PKG_POLICY
="Installed: \(none\)\*"
25 UBUNTU_PKG_VERSION
=`echo $UBUNTU_PKG_POLICY | awk '{print $2}'`
26 echo "$F = $UBUNTU_PKG_VERSION"