view move-if-change @ 110839:018f0b2e8f23

Fix return value of dnd-get-local-file-name (Bug#7090). * lisp/dnd.el (dnd-get-local-file-name): If MUST-EXIST is non-nil, only return non-nil if the file exists (Bug#7090).
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 02 Oct 2010 21:27:39 -0400
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