Koha/install_misc/ubuntu-pkg-check.sh
Eric Olsen 858f67f01a Bug 5217 : package/CPAN updates for Ubuntu Lucid install
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 08:04:38 -04:00

19 lines
494 B
Bash
Executable file

#!/bin/sh
UBUNTU_PACKAGES=`dirname $0`/ubuntu.packages
# sanity checks
if [ ! -e $UBUNTU_PACKAGES ]; then
echo ERROR: Could not find $UBUNTU_PACKAGES file for running check.
exit
fi
# main
UBUNTU_PACKAGES_LIST=`awk '{print $1}' $UBUNTU_PACKAGES | grep -v '^\s*#' | grep -v '^\s*$'`
for F in $UBUNTU_PACKAGES_LIST; do
UBUNTU_PKG_POLICY=`apt-cache policy $F | grep "Installed:"`
UBUNTU_PKG_VERSION=`echo $UBUNTU_PKG_POLICY | awk '{print $2}'`
echo "$F = $UBUNTU_PKG_VERSION"
done