Op 13-03-18 om 09:27 schreef We Ka:
Hey, that is a pretty cute script. Thank you very much! :)

You're welcome.

Yet, there are a few things that needed to be corrected to make it work:

1. the URL's hostname needs to be "download", not "dl3", in order to be resolved. (I guess there's some load balancing happening there.)

Agreed. In my reality download works just fine.

2. the line containing the grep command needs to end with a "\ ". (That's two characters: a backslash followed by a space, but without quotes around them.)

No, that is not needed. If you copy this to a bash script it works. I think you've fallen victim to a local issue of command line and/or shell

3. curl doesn't seem to be able to handle the actual URL containing the "&" (ampersand). I had to replace curl by wget in order to make the download work:
|
           wget "${BASE_URL}${MAP}"-O "${STOR}/${MAP}"
|


This is probably related to the curl version. Depending on your distribution you might get a different curl.
Mine is:

koos@zwaluw:~> curl --version
curl 7.37.0 (x86_64-suse-linux-gnu) libcurl/7.37.0 OpenSSL/1.0.2j zlib/1.2.8 libidn/1.28 libssh2/1.4.3

Apart from that: very handy! Now I can get the list of files every week or so, compare it to the version from the last check, and if there's a difference, I can download the maps and distribute them to all of my Android devices inside my home network using "OwnCloud" and "foldersync".

Yup :-)

--
You received this message because you are subscribed to the Google Groups 
"Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osmand+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to