view move-if-change @ 108651:2e8869e152ed

Fix stack overflow in string creation (Bug#6214). * character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to prevent stack overflow if number of arguments is too large (Bug#6214).
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 18 May 2010 14:05:43 -0400
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