view move-if-change @ 95346:29a62a8c830b

Use buffer-swap-text to separate summary and raw data. (tar-header-offset): Remove. (tar-parse-info, tar-header-offset, tar-file-name-coding-system): Not permanent any more. (tar-data-buffer): New var. (tar-data-swapped-p, tar-change-major-mode-hook) (tar-mode-kill-buffer-hook): New funs. (tar-untar-buffer, tar-summarize-buffer, tar-mode, tar-mode-revert) (tar-extract, tar-copy, tar-expunge-internal, tar-expunge) (tar-clear-modification-flags, tar-alter-one-field) (tar-subfile-save-buffer, tar-pad-to-blocksize, tar-mode-write-file): Change accordingly.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 27 May 2008 17:58:40 +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