Gerard Seibert wrote:

> Is it possible for wget to compare the file named "AV.hdb'
> located in one directory, and if it is older than the AV.hdb.gz file
> located on the remote server, to download the "AV.hdb.gz" file to the
> temporary directory?

No, you can only get wget to compare a file of the same name between your
local system and the remote server.

> The only option I have come up with is to keep a copy of the "gz" file
> in the temporary directory and run wget from there.

You will need to keep the original "gz" file with a timestamp matching the
server in order for wget to know that the file you have is the same as the
one on the server.

> Unfortunately, at least as far as I can tell, wget does not issue an
> exit code if it has downloaded a newer file.

Better exit codes is on the wish list.

> It would really be nice though if wget simply issued an exit code if
> an updated file were downloaded.

Yes, it would.

> Therefore, I am unable to craft a script that will unpack the file,
> test and install it if a newer version has been downloaded.

Keep one directory that matches the server and another one (or perhaps two)
where you process new files. Before and after wget runs, you can check the
dates on the directory that matches the server. You only need to process
files that changed.

Hope that helps.

Tony


Reply via email to