view move-if-change @ 1561:6f4c71266175

[xemacs-hg @ 2003-07-05 08:40:36 by adrian] xemacs-21.5: package installation fixes -------------------- ChangeLog entries follow: -------------------- lisp/ChangeLog addition: 2003-07-05 Adrian Aichner <adrian@xemacs.org> * package-admin.el (package-admin-find-top-directory): Simplify directory comparisions and fix substring errors on short path components. * package-get.el (package-get-package-index-file-location): Default to first component of "EMACSPACKAGEPATH", if set.
author adrian
date Sat, 05 Jul 2003 08:40:37 +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