view move-if-change @ 945:7924b28c57a4

[xemacs-hg @ 2002-08-01 08:38:32 by michaels] 2002-07-31 Didier Verna <didier@xemacs.org> * file-coding.c (make_coding_system_1): Add missing call to `xfree (newname)'. * fix memory leak introduced by 2002-04-14 Ben Wing <ben@xemacs.org>: alloc.c (Fmake_byte_code): don't xnew_array of size 0. (sweep_compiled_functions): define ADDITIONAL_FREE_compiled_function to free the args field when needed.
author michaels
date Thu, 01 Aug 2002 08:38:48 +0000
parents 376386a54a3c
children
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