view move-if-change @ 5804:75435be92103

Avoid make_uninit_string() for the command builder's echo_buf. src/ChangeLog addition: 2014-08-03 Aidan Kehoe <kehoea@parhasard.net> * event-stream.c (allocate_command_builder): * event-stream.c (Fnext_event): Use #'make-string rather than make_uninit_string() when allocating the command builder's echo_buf, avoiding having octets in the string that do not correspond to valid internal-format text.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 03 Aug 2014 20:13:40 +0100
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