view move-if-change @ 68037:e70c943e7ff3

(mac_coerce_file_name_ptr, mac_coerce_file_name_desc): Don't check that the other type is known file-related one.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Thu, 05 Jan 2006 08:14:12 +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