view move-if-change @ 82944:827101d5eacc

(image-type): New variable. (image-mode): Set default major mode name to "Image[text]". (image-minor-mode): Change LIGHTER to display image-type in the mode line. (image-minor-mode): Set default image-type to "text". (image-toggle-display): After switching to text mode, set image-type to "text" and major mode name to "Image[text]". After switching to image mode, set image-type to actual image type, and add image type to major mode name. Let-bind the same variable names as arguments of `image-type' and `create-image'. Bind `type' to the result of `image-type' and use it as arg of `create-image' to not determine the image type twice.
author Juri Linkov <juri@jurta.org>
date Tue, 28 Aug 2007 22:31:41 +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