view move-if-change @ 86985:783469dd1f73

* lisp/saveplace.el (save-place-alist-to-file): Use `utf-8' coding system when writing, and set it in the first-line file variables. Based on a patch by David Reitter <dreitter{_AT_}inf.ed.ac.uk> and a suggestion by Juanma Barranquero.
author Karl Fogel <kfogel@red-bean.com>
date Sun, 02 Dec 2007 21:15:22 +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