#!/bin/bash cd /var/univention/buildsystem2/apt/ucs_3.0-0/ cd /var/univention/buildsystem2/test_mirror/ftp/3.0/maintained/3.0-0 while read pkg foo do for deb in */${pkg}_*.deb do echo -n "$deb ..." data=$(ar p "$deb" control.tar.gz | gzip -dc | tar xfO - ./{pre,post}{inst,rm} 2>/dev/null) if fgrep -q univention-install-config-registry <<<"$data" then if egrep -q "\[ -e (/etc/univention/templates/removed/$pkg.info) \] && \[ ! -e (/etc/univention/templates/info/$pkg.info) \] && mv \1 \2 \|\| true" <<<"$data" then echo $(tput setaf 2)OK$(tput op) else echo $(tput setaf 1)FAIL$(tput op) fi else echo $(tput setaf 4)SKIP$(tput op) fi done done <