summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-01-17 02:12:00 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-01-17 02:12:00 +0000
commit907e18c71717f6a1c968e166582f5d4bc55d317a (patch)
tree8e545a7290334436939cdaecc118548cfe83c5e4 /bin
parent5701df1e25af2fca1d46fb357404bed36013085c (diff)
downloadfedora-doc-utils-907e18c71717f6a1c968e166582f5d4bc55d317a.tar.gz
fedora-doc-utils-907e18c71717f6a1c968e166582f5d4bc55d317a.tar.xz
fedora-doc-utils-907e18c71717f6a1c968e166582f5d4bc55d317a.zip
Automatically create a backup, similar to "mv -b", if we replace
a file.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/move-if-change7
1 files changed, 5 insertions, 2 deletions
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 <Tommy.Reynolds@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 @@ 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