view move-if-change @ 4458:d9b9b5f90386

Provide SHEBANG_PROGNAME on Win32; correct a bug with it and string concat'ing nt/ChangeLog addition: 2008-05-13 Aidan Kehoe <kehoea@parhasard.net> * xemacs.mak (PROGRAM_DEFINES): Provide SHEBANG_PROGNAME on Win32 too. src/ChangeLog addition: 2008-05-13 Aidan Kehoe <kehoea@parhasard.net> * emacs.c (SHEBANG_EXE_PROGNAME_LENGTH): Use WEXTSTRING separately on the two concatenated strings, avoiding an error on Win32.
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 13 May 2008 20:16:53 +0200
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