view move-if-change @ 1529:d4c017f833e2

[xemacs-hg @ 2003-06-15 13:25:46 by adrian] [A21.5R21.4] [PATCH] xemacs-21.5: minitar.c to handle 0 size files -------------------- ChangeLog entries follow: -------------------- nt/ChangeLog addition: 2003-06-15 Adrian Aichner <adrian@xemacs.org> * minitar.c (main): Handle 0 size files correctly.
author adrian
date Sun, 15 Jun 2003 13:25:46 +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