view move-if-change @ 5687:965a9ddc915a

Introduce call-process-shell-command from GNU. Thanks GNU. Used in recent versions of org-mode. 2012-10-13 Mats Lidell <matsl@xemacs.org> * process.el (call-process-shell-command): New function from GNU. 2012-10-13 Mats Lidell <matsl@xemacs.org> * lispref/processes.texi (Synchronous Processes): New function call-process-shell-command. 2012-10-13 Mats Lidell <matsl@xemacs.org> * automated/process-tests.el: Simple test cases for call-process-shell-command.
author Mats Lidell <matsl@xemacs.org>
date Sat, 13 Oct 2012 01:09:35 +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