view move-if-change @ 71923:6d714c43de54

(ff-special-constructs): Doc fix. Also, for C/C++ entry, don't assign to free var; simply return the extracted filename. (ff-treat-as-special): Incorporate common preamble from callers. (ff-other-file-name, ff-find-the-other-file): Update call to ff-treat-as-special.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Sun, 16 Jul 2006 21:08:28 +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