view move-if-change @ 4457:2fddd822ce87

#define _CRT_NONSTDC_NO_DEPRECATE on Win32 2008-05-13 Aidan Kehoe <kehoea@parhasard.net> * config.h.in (_CRT_NONSTDC_NO_DEPRECATE): Define this, to avoid warnings about using standard POSIX and C9X functions on Win32; fixes part of Matthew Persico's problems of 9ea6aaa80805081832r1a3308e9wb6d2bfea7457379f@mail.gmail.com .
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 13 May 2008 20:11:51 +0200
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