view move-if-change @ 73700:294b1de9ac5f

2006-11-05 Micha?Cadilhac <michael.cadilhac@lrde.org> * battery.el (battery-linux-proc-acpi): Search an ac_adapter in `/proc/acpi/ac_adapter/*'. Ditto for the thermometers in `/proc/acpi/thermal_zone/*'. (battery-search-for-one-match-in-files): New. Search a regexp in the content of some files.
author Romain Francoise <romain@orebokech.com>
date Sun, 05 Nov 2006 13:22:30 +0000
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