]> sjero.net Git - wget/blobdiff - src/main.c
doc: document --backups
[wget] / src / main.c
index 2b42d2d7235eda6c1d7295b974423a6bb13c1084..8ce0eb3ff252f47c26d824e3074ec29b113ea065 100644 (file)
@@ -714,6 +714,9 @@ Recursive download:\n"),
     N_("\
   -k,  --convert-links      make links in downloaded HTML or CSS point to\n\
                             local files.\n"),
+    N_("\
+  --backups=N   before writing file X, rotate up to N backup files.\n"),
+
 #ifdef __VMS
     N_("\
   -K,  --backup-converted   before converting file X, back up as X_orig.\n"),
@@ -1397,6 +1400,13 @@ for details.\n\n"));
         }
     }
 
+  /* Set various options as required for opt.method.  */
+
+  /* When user specifies HEAD as the method, we do not wish to download any
+     files. Hence, set wget to run in spider mode.  */
+  if (opt.method && strcasecmp (opt.method, "HEAD") == 0)
+    setoptval ("spider", "1", "spider");
+
   /* Convert post_data to body-data and post_file_name to body-file options.
      This is required so as to remove redundant code later on in gethttp().
      The --post-data and --post-file options may also be removed in