# Process the incoming configuration files

if [ ! -f usr/lib/pine/pine.conf ]
then
   mv install/conf/usr/lib/pine/pine.conf usr/lib/pine/pine.conf
else
   if [ "`md5sum install/conf/usr/lib/pine/pine.conf | cut -d ' ' -f 1 2>/dev/null`" = "`md5sum usr/lib/pine/pine.conf | cut -d ' ' -f 1 2>/dev/null`" ]
   then
      mv install/conf/usr/lib/pine/pine.conf usr/lib/pine/pine.conf
   else
      rm install/conf/usr/lib/pine/pine.conf
   fi
fi

# Make sure the incoming conf directory is gone
rm -rf install/conf
