On Tue, 20 Jul 2021, Sven Schreiber wrote:
I'm wondering whether a hansl script can download a zip archive,
and ideally also unzip the archive to save the various include
files. I don't think it's possible, but then I don't understand
the curl() function very well, and so I thought I might ask. I
know that readfile() for example can handle zip compression, but I
believe that only applies to a single file, not an archive.
No, current gretl cannot do what you describe. The functions
reaadfile() and curl() are about grabbing text buffers from internet
sources, not binary streams such as zipfiles. Gretl can handle
zipfiles internally (e.g. function packages that take that form) but
such functionality is not available to hansl scripting other than
via "pkg install".
(It's clear that it's fairly simple by invoking external
through the 'foreign' interface. That's not my question.)
Leaving aside the "foreign" apparatus you can use shell directives
from within hansl, if you have curl and unzip binaries installed.