Abueesp
Abueesp

Reputation: 121

Wildcard on wget to http download last release version

Imagine (as John Lenon would) that I am coding a script to download, let's say, the last version of KeePassTrueCrypt plugin.

It is a pain to update for the last release just because the URL contains the version number instead of simply 'last release' or a PPA, so I am using a wildcard. This is my try:

wget -r --no-parent -A "KeepassTrueCryptMount_v**.plgx.7z" https://bitbucket.org/schalpat/keepasstruecryptmount/downloads/

But 1) It only downloads index.html and robots.txt instead of the file 2) It is not specified to download the last version (max function?).

I appreciate any help. Cheers,

Upvotes: 1

Views: 770

Answers (1)

A.A
A.A

Reputation: 2713

The files you are trying to download are hosted on another domain named amazonaws.com. So you could try these options to Download from another domains. because Wget’s recursive retrieval normally refuses to visit hosts different than the one you specified on the command line.

-H The ‘-H’ option turns on host spanning, thus allowing Wget’s recursive run to visit any host referenced by a link.

-D The ‘-D’ option allows you to specify the domains that will be followed, thus limiting the recursion only to the hosts that belong to these domains. Obviously, this makes sense only in conjunction with ‘-H’

Upvotes: 1

Related Questions