docs-common/bin move-if-change,1.1,1.2
Tommy Reynolds (jtr)
fedora-docs-commits at redhat.com
Tue Jan 17 02:12:22 UTC 2006
Author: jtr
Update of /cvs/docs/docs-common/bin
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22901/bin
Modified Files:
move-if-change
Log Message:
Automatically create a backup, similar to "mv -b", if we replace
a file.
Index: move-if-change
===================================================================
RCS file: /cvs/docs/docs-common/bin/move-if-change,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- move-if-change 17 Jan 2006 02:02:13 -0000 1.1
+++ move-if-change 17 Jan 2006 02:12:00 -0000 1.2
@@ -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 <Tommy.Reynolds at MegaCoder.com>, for the Fedora Documentation
+# Project, to automatically create a backup of any file we touch.
+
if
test -r $2
then
@@ -25,8 +28,8 @@
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
More information about the Fedora-docs-commits
mailing list