view move-if-change @ 111351:83594fbec156

Prevent server-mode from issuing a prompt in kill-emacs-hook. * server.el (server-start): New arg INHIBIT-PROMPT prevents asking user for confirmation. (server-force-stop): Use it. (server-start): Use server-force-stop for kill-emacs-hook, to avoid user interaction while killing Emacs.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 31 Oct 2010 23:35:06 -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