|
|
a8b0b1 |
From 44ba49b31f4ea515f8a6ef2642a34c0fd2024b90 Mon Sep 17 00:00:00 2001
|
|
|
a8b0b1 |
From: Giuseppe Scrivano <gscrivano@gnu.org>
|
|
|
a8b0b1 |
Date: Tue, 9 Jul 2013 00:50:30 +0200
|
|
|
a8b0b1 |
Subject: [PATCH] doc: document --backups
|
|
|
a8b0b1 |
|
|
|
a8b0b1 |
---
|
|
|
a8b0b1 |
doc/wget.texi | 15 ++++++++++++---
|
|
|
a8b0b1 |
src/main.c | 3 +++
|
|
|
a8b0b1 |
2 files changed, 15 insertions(+), 3 deletions(-)
|
|
|
a8b0b1 |
|
|
|
a8b0b1 |
diff --git a/doc/wget.texi b/doc/wget.texi
|
|
|
a8b0b1 |
index 5054382..7a1670e 100644
|
|
|
a8b0b1 |
--- a/doc/wget.texi
|
|
|
a8b0b1 |
+++ b/doc/wget.texi
|
|
|
a8b0b1 |
@@ -630,6 +630,13 @@ Note that when @samp{-nc} is specified, files with the suffixes
|
|
|
a8b0b1 |
@samp{.html} or @samp{.htm} will be loaded from the local disk and
|
|
|
a8b0b1 |
parsed as if they had been retrieved from the Web.
|
|
|
a8b0b1 |
|
|
|
a8b0b1 |
+@cindex backing up files
|
|
|
a8b0b1 |
+@item --backups=@var{backups}
|
|
|
a8b0b1 |
+Before (over)writing a file, back up an existing file by adding a
|
|
|
a8b0b1 |
+@samp{.1} suffix (@samp{_1} on VMS) to the file name. Such backup
|
|
|
a8b0b1 |
+files are rotated to @samp{.2}, @samp{.3}, and so on, up to
|
|
|
a8b0b1 |
+@var{backups} (and lost beyond that).
|
|
|
a8b0b1 |
+
|
|
|
a8b0b1 |
@cindex continue retrieval
|
|
|
a8b0b1 |
@cindex incomplete downloads
|
|
|
a8b0b1 |
@cindex resume download
|
|
|
a8b0b1 |
@@ -2882,9 +2889,11 @@ enables it).
|
|
|
a8b0b1 |
Enable/disable saving pre-converted files with the suffix
|
|
|
a8b0b1 |
@samp{.orig}---the same as @samp{-K} (which enables it).
|
|
|
a8b0b1 |
|
|
|
a8b0b1 |
-@c @item backups = @var{number}
|
|
|
a8b0b1 |
-@c #### Document me!
|
|
|
a8b0b1 |
-@c
|
|
|
a8b0b1 |
+@item backups = @var{number}
|
|
|
a8b0b1 |
+Use up to @var{number} backups for a file. Backups are rotated by
|
|
|
a8b0b1 |
+adding an incremental counter that starts at @samp{1}. The default is
|
|
|
a8b0b1 |
+@samp{0}.
|
|
|
a8b0b1 |
+
|
|
|
a8b0b1 |
@item base = @var{string}
|
|
|
a8b0b1 |
Consider relative @sc{url}s in input files (specified via the
|
|
|
a8b0b1 |
@samp{input} command or the @samp{--input-file}/@samp{-i} option,
|
|
|
a8b0b1 |
diff --git a/src/main.c b/src/main.c
|
|
|
a8b0b1 |
index c895c4e..8ce0eb3 100644
|
|
|
a8b0b1 |
--- a/src/main.c
|
|
|
a8b0b1 |
+++ b/src/main.c
|
|
|
a8b0b1 |
@@ -714,6 +714,9 @@ Recursive download:\n"),
|
|
|
a8b0b1 |
N_("\
|
|
|
a8b0b1 |
-k, --convert-links make links in downloaded HTML or CSS point to\n\
|
|
|
a8b0b1 |
local files.\n"),
|
|
|
a8b0b1 |
+ N_("\
|
|
|
a8b0b1 |
+ --backups=N before writing file X, rotate up to N backup files.\n"),
|
|
|
a8b0b1 |
+
|
|
|
a8b0b1 |
#ifdef __VMS
|
|
|
a8b0b1 |
N_("\
|
|
|
a8b0b1 |
-K, --backup-converted before converting file X, back up as X_orig.\n"),
|
|
|
a8b0b1 |
--
|
|
|
a8b0b1 |
1.8.3.1
|
|
|
a8b0b1 |
|