view move-if-change @ 110899:beddb591d182

Simplify r101871. * epa.el (epa-passphrase-callback-function): Display filename passed as the 3rd arg. * epa-file.el (epa-file-passphrase-callback-function): Pass filename to epa-passphrase-callback-function.
author Daiki Ueno <ueno@unixuser.org>
date Sun, 10 Oct 2010 10:45:45 +0900
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