view move-if-change @ 86170:e6b555f6c76b

(ring-size, ring-p, ring-insert, ring-length, ring-empty-p): Use c[ad]dr. (ring-plus1): Use `1+'. (ring-minus1): Use `zerop'. (ring-remove): Use c[ad]dr. Use `when'. (ring-copy): Use c[ad]dr. Use `let', not `let*'. (ring-ref): Use `let', not `let*'. (ring-insert-at-beginning): Use c[ad]dr. Doc fix. (ring-insert+extend): Use c[ad]dr. Fix typo in docstring. (ring-member): Simplify. Doc fix. (ring-convert-sequence-to-ring): Simplify.
author Juanma Barranquero <lekktu@gmail.com>
date Sat, 17 Nov 2007 02:50:37 +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