lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master b1e6cef 2/5: Use 'wget -N' even for servers t


From: Greg Chicares
Subject: [lmi-commits] [lmi] master b1e6cef 2/5: Use 'wget -N' even for servers that don't offer time stamps
Date: Fri, 5 Jun 2020 12:03:21 -0400 (EDT)

branch: master
commit b1e6cef1cc2b86d06e459cc3dbcdca56512a2c21
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Use 'wget -N' even for servers that don't offer time stamps
    
    With github.com, 'wget -N' elicits this message:
      Last-modified header missing -- time-stamps turned off.
    but '-N' still has an important effect: it causes any existing copy of
    the same file to be overwritten. (That's the behavior described in the
    gnu wget manual for a different set of circumstances:
      | When running Wget with ‘-r’ or ‘-p’, but without ‘-N’, ‘-nd’,
      | or ‘-nc’, re-downloading a file will result in the new copy
      | simply overwriting the old.
    so, in effect, an unavailable remote timestamp is treated as older than
    any local copy that already exists.)
    
    Thus, for servers that don't provide timestamps, wget without '-N'
    doesn't overwrite an existing copy; instead, it saves a fresh copy with
    a serial suffix (".1", ".2", etc.), which is clearly not desirable here.
---
 gwc/redhat_rebuild.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gwc/redhat_rebuild.sh b/gwc/redhat_rebuild.sh
index 5915637..602f822 100755
--- a/gwc/redhat_rebuild.sh
+++ b/gwc/redhat_rebuild.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 cd /srv/cache_for_lmi/logs || printf 'Cannot cd\n'
-wget -nv https://github.com/vadz/lmi/raw/master/lmi_setup_00.sh
+wget -N -nv https://github.com/vadz/lmi/raw/master/lmi_setup_00.sh
 chmod +x lmi_setup_00.sh
 # It would be undesirable for root to own the output file:
 # shellcheck disable=SC2024



reply via email to

[Prev in Thread] Current Thread [Next in Thread]