#!/bin/sh set -e if $(cat "/etc/apt/sources.list" | grep -q "wheezy-backports"); then echo "Adding pin preferences for wheezy-backports" cat > "/etc/apt/preferences.d/wheezy-backports" << EOF Package: dh-python dh-systemd devscripts Pin: release a=wheezy-backports Pin-Priority: 999 EOF else if [ -f /etc/apt/preferences.d/wheezy-backports ]; then rm -vf /etc/apt/preferences.d/wheezy-backports fi fi