view move-if-change @ 2574:5e2653bc0ab0

[xemacs-hg @ 2005-02-08 23:59:50 by aidan] Add coding system aliases for utf-16-be and utf-16-le, for improved compatibility with Mule-UCS and the FSF.
author aidan
date Tue, 08 Feb 2005 23:59:51 +0000
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