view move-if-change @ 5527:b3b28406da8c

Add a custom group that applies to view-mode-line-string. lisp/ChangeLog addition: 2011-06-24 Aidan Kehoe <kehoea@parhasard.net> * view-less.el (view): Add a custom group to this file, so view-mode-line-string has an associated custom group automatically.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 24 Jun 2011 19:58:12 +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