view move-if-change @ 109130:cd13b432f239

Fix more prototypes. * atimer.c (start_atimer): Use EMACS_TIME, not struct timeval. * sysdep.c (set_file_times): Use EMACS_TIME, not struct timeval. * xgselect.c (xg_select): Use SELECT_TYPE, EMACS_TIME.
author Juanma Barranquero <lekktu@gmail.com>
date Sun, 04 Jul 2010 15:41:55 +0200
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