view move-if-change @ 5722:fffa15138019

Don't complain about throws out of `post-command-hook'. 2013-02-22 Michael Sperber <mike@xemacs.org> * event-stream.c (post_command_hook): Don't complain about throws out of `post-command-hook'. This is quite common, for example to exit the minibuffer.
author Mike Sperber <sperber@deinprogramm.de>
date Fri, 22 Feb 2013 16:18:37 +0100
parents 376386a54a3c
children
line wrap: on
line source

#!/bin/sh
if
test -r $2
then
if
cmp $1 $2 > /dev/null
then
echo $2 is unchanged
rm -f $1
else
mv -f $1 $2
fi
else
mv -f $1 $2
fi