[Live-demo] Re: Use of "wget -c"

Cameron Shorter cameron.shorter at lisasoft.com
Wed Sep 9 18:32:35 EDT 2009


Thanks Hamish, I suspected there would be good reasons.
Before getting this email, I've gone through and replaced all "wget" with
"wget -c".  Feel free to change back if you think it needed. If not, I'll
probably get to it eventually.

Of note, I'm keeping a local copy of the /tmp directory for quick
synchronising and rebuilding the scripts.

On Thu, Sep 10, 2009 at 7:44 AM, Hamish <hamish_b at yahoo.com> wrote:

> Cameron wrote:
> > I notice that you have used "wget -c" and "wget -r" in different
> > places in the install scripts.
>
> Right, this is intentional.
>
> -c to continue aborted download instead of starting over as file.1,
> file.2, file.3, etc.  This has been used for large downloads (10s of MB)
> which are not expected to change. i.e. versioned sample datasets. This
> is not safe for files which may change on the server, it simply compares
> the number of bytes to decide if it has the whole file. If the file is
> already downloaded wget will say that and then exit with a EXIT_SUCCESS
> exit status.
>
>
> -r is really for recursive mode, but when used on a single file it will
> replace the existing one. This is also to help the scripts be a bit more
> robust to the"file.1" vs. "file" problem, especially for files downloaded
> directly into the filesystem & not the build dir.
>
> I've used this for downloading patches and other small text files which
> may change with time. When -r is used in this way --output-document= or
> -O must be used as well, otherwise the recursive side of it tries to
> reconstruct the dir structure. Maybe a "rm" before the wget could ensure
> that the downloaded version is fresh without needing -r. Shrug.
>
>
> Finally for trivial downloads I don't expect to change (icons) I used
> "wget -nv" which is non-verbose mode. Using that for a long download
> could give the impression things have stalled, ^C, then file.1, file.2,
> cruft. "wget --quiet" masks error messages so is to be avoided.
>
>
> I think wget already checks if stdout is a tty before deciding to use
> =====>  vs.  |.....|.....|.... style progress meters. (ie logfile friendly)
> Otherwise you could switch that on by hand as well.
>
>
> > Should we go through the scripts and convert all "wget" to "wget -c" ?
>
> I don't think so; one size doesn't fit all..
>
> as long as everyone builds and downloads to /tmp/ dirs and cleans up
> every time, the flags will be mostly redundant overkill.
>
> I'm happy with ad hoc and folks using or not using those flags as they
> see fit.
>
>
> regards,
> Hamish
>
>
>
>
> _______________________________________________
> Live-demo mailing list
> Live-demo at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/live-demo
>



-- 
Cameron Shorter
Geospatial Systems Architect
Tel: +61 (0)2 8570 5050
Mob: +61 (0)419 142 254

Think Globally, Fix Locally
Commercial Support for Geospatial Open Source Solutions
http://www.lisasoft.com/LISAsoft/SupportedProducts.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/live-demo/attachments/20090910/265e8f5c/attachment.html


More information about the Live-demo mailing list