From 907e18c71717f6a1c968e166582f5d4bc55d317a Mon Sep 17 00:00:00 2001 From: Tommy Reynolds Date: Tue, 17 Jan 2006 02:12:00 +0000 Subject: Automatically create a backup, similar to "mv -b", if we replace a file. --- bin/move-if-change | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/move-if-change b/bin/move-if-change index ee1b348..c26fd2a 100755 --- a/bin/move-if-change +++ b/bin/move-if-change @@ -16,6 +16,9 @@ # along with this program; if not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Modified by , for the Fedora Documentation +# Project, to automatically create a backup of any file we touch. + if test -r $2 then @@ -25,8 +28,8 @@ then echo $2 is unchanged rm -f $1 else -mv -f $1 $2 +mv -f -b $1 $2 fi else -mv -f $1 $2 +mv -f -b $1 $2 fi -- cgit