view move-if-change @ 84779:67e430e38471

(DEV_TTY): New macro. Provide a definition for MS-Windows. (FRAME_TERMCAP_P) [WINDOWSNT]: Don't define to zero. (Fcontrolling_tty_p, Fresume_tty, dissociate_if_controlling_tty) (init_tty): Use DEV_TTY instead of "/dev/tty". [WINDOWSNT]: No need to protect from NAME arg being null.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 22 Sep 2007 12:40:57 +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