view move-if-change @ 5781:0853e1ec8529

Use alloca_{rawbytes,ibytes} in #'copy-file, #'insert-file-contents-internal src/ChangeLog addition: 2014-01-20 Aidan Kehoe <kehoea@parhasard.net> * fileio.c (Fcopy_file, Finsert_file_contents_internal): Use alloca_{rawbytes,ibytes} here instead of the implicit alloca on the stack; doesn't change where the buffers are allocated for these two functions, but does mean that decisions about alloca vs. malloc based on buffer size are made in the same place (ultimately, the ALLOCA() macro).
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 20 Jan 2014 17:53:07 +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