view move-if-change @ 40638:84e66cdcffc5

(help-xref): New button type. (help-function, help-variable, help-face, help-coding-system) (help-input-method, help-character-set, help-type, help-symbol) (help-back, help-info, help-customize-variable, help-customize-face) (help-function-def, help-variable-def): Use it as a supertype. Remove `action' property.
author Miles Bader <miles@gnu.org>
date Fri, 02 Nov 2001 05:49:48 +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