view move-if-change @ 87697:e0467846347e

2008-01-10 Tassilo Horn <tassilo@member.fsf.org> * doc-view.el (doc-view-buffer-file-name): New variable. (doc-view-convert-current-doc, doc-view-search) (doc-view-current-cache-dir, doc-view-initiate-display) (doc-view-mode): Use it. (doc-view-bookmark-make-cell): Use variable buffer-file-name instead of function.
author Tassilo Horn <tassilo@member.fsf.org>
date Thu, 10 Jan 2008 15:08:10 +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