Bug 5370: Fix all the references to koha.org
[wip/koha-chris_n.git] / install_misc / ubuntu-pkg-check.sh
1 #!/bin/sh
2
3 UBUNTU_PACKAGES=`dirname $0`/ubuntu.packages
4
5 # sanity checks
6
7 if [ ! -e $UBUNTU_PACKAGES ]; then
8   echo ERROR:  Could not find $UBUNTU_PACKAGES file for running check.
9   exit
10 fi
11
12 # main
13
14 UBUNTU_PACKAGES_LIST=`awk '{print $1}' $UBUNTU_PACKAGES | grep -v '^\s*#' | grep -v '^\s*$'`
15 for F in $UBUNTU_PACKAGES_LIST; do
16   UBUNTU_PKG_POLICY=`apt-cache policy $F | grep "Installed:"`
17   UBUNTU_PKG_VERSION=`echo $UBUNTU_PKG_POLICY | awk '{print $2}'`
18   echo "$F = $UBUNTU_PKG_VERSION"
19 done