view move-if-change @ 67121:f354001864bf

* info.el (Info-on-current-buffer): Record actual filename in Info-current-file, instead of t, or a fake filename if a non-file buffer. Make autoload. (Info-find-node, Info-revert-find-node): No need to check for Info-current-file nil. (Info-set-mode-line, Info-up, Info-copy-current-node-name): Info-current-file is now never `t'. (Info-fontify-node): Many simplifications due to Info-current-file always being valid. Use Info-find-file to find node filename.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 25 Nov 2005 16:35:34 +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