#!/bin/sh
backup_maybe() {
    if ! [ -e $1 ] || ! diff -q $1 $1.setupnew >/dev/null 2>&1; then
        mv -f $1 $1.old 2>/dev/null
        mv -f $1.setupnew $1 2>/dev/null
    else
        rm -f $1.setupnew
    fi
}
backup_maybe /etc/Muttrc
backup_maybe /etc/mime.types

