view move-if-change @ 99299:8460775a4023

(Types of Log File): Change logs are older than version control. (VCS Concepts): Simplify and rearrange. (Version Control Systems): Make it clear that Linux is only the kernel. (VC Mode Line): Shorten reference to menu item. (Basic VC Editing): Clarify VC fileset. Shorten and simplify. (VC Directory Mode): Minor cleanup. Unchanged files are hidden, not omitted. (VC Directory Commands): Shorten and simplify. (Change Log Commands): New node, split from Change Logs. (VC Directory Buffer): New node, split from VC Directory Mode.
author Richard M. Stallman <rms@gnu.org>
date Sat, 01 Nov 2008 01:58:13 +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