view move-if-change @ 66121:b1015e4158db

Don't require CL at runtime. (savehist-xemacs): Remove. (savehist-coding-system): Use utf-8 if available, regardless of religion. (savehist-no-conversion): Use (featurep 'xemacs). (savehist-load): Check existence of start-itimer rather than XEmacs. Use an idle timer. (savehist-process-for-saving): Replace use of CL funs `subseq' and `delete-if-not'.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 16 Oct 2005 15:22:37 +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