view move-if-change @ 4162:8f6a825eb3d3

[xemacs-hg @ 2007-09-04 21:20:18 by aidan] Eliminate a crash when profiling; only pass the backtrace record to profile_record_about_to_call, profile_record_just_called when it's non-nil.
author aidan
date Tue, 04 Sep 2007 21:20:26 +0000
parents 376386a54a3c
children
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