view move-if-change @ 103958:f261612c30a6

(desktop-buffers-not-to-save): Default value is nil. Accept nil in addition to a regexp. (desktop-files-not-to-save): Add "(ftp)$" to the default regexp. Accept nil in addition to a regexp. (desktop-save-buffer-p): Don't use desktop-buffers-not-to-save for buffers that have an associated file. Handle nil values of desktop-buffers-not-to-save and desktop-files-not-to-save. (Bug#3833)
author Eli Zaretskii <eliz@gnu.org>
date Sat, 18 Jul 2009 11:58:39 +0000
parents 354e0c45cedf
children 14a97ab281d5
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