#!/bin/sh

sed -e '/# -\*- ogre-plugins -\*-/ q' \
    /etc/OGRE/plugins.cfg >/etc/OGRE/plugins.cfg-new

PARTS="`ls 2>/dev/null /etc/OGRE/plugins.cfg.*`"
for f in $PARTS ; do
    if [ -z "`echo $f | grep dpkg`" ] ; then
        echo Adding $f
        cat $f >>/etc/OGRE/plugins.cfg-new
    fi
done

mv /etc/OGRE/plugins.cfg-new /etc/OGRE/plugins.cfg
