view move-if-change @ 109612:b7ff82b433d8

Enable ICANON (Bug#6771). Any long line problem must be solved differently. There is AFAIK no bug report or test case for the long line problem. * sysdep.c (child_setup_tty): Enable ICANON in lflags and set VEOF to Control-D (Bug#6771).
author Jan D. <jan.h.d@swipnet.se>
date Mon, 02 Aug 2010 09:03:12 +0200
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