#!/bin/sh
set -e

case "$1" in
    install|upgrade)
        OPTFILE="/var/lib/get_iplayer/options"
        if dpkg --compare-versions "$2" le "2.49-1"; then
            if [ -f $OPTFILE -a ! -L $OPTFILE ]; then
                echo "Backing up configuration to $OPTFILE.old"
                cp -f $OPTFILE $OPTFILE.old
            fi
        fi
esac

#DEBHELPER#
