view move-if-change @ 5884:5a93f519accc

If not waiting for C-x #, don't memorise the device, #'gnuserv-edit-files lisp/ChangeLog addition: 2015-04-03 Aidan Kehoe <kehoea@parhasard.net> * gnuserv.el (gnuserv-edit-files): No need to memorise the device created for the sake of C-x #, if the client is not waiting for us. Fixes a bug in the following situation: -- Start gnuserv from an XEmacs within screen -- Call gnuclient with an X11 display available, connecting successfully to that XEmacs and creating an X11 frame -- Then call gnuclient file-name.txt, save the file, then type C-x #; this deletes all the frames on the device, which it shouldn't.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 03 Apr 2015 00:27:59 +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