occ-module-installer (proc)
public {occ-module-installer
    module:String,
    ...:String
}:{proc-type {new-root-url:Url, old-root-url:Url}:bool}
Import from: CURL.GUI.STANDARD. Defined in package CURL.GUI.DIALOGS.

Create an installer for use with occ-install-or-update which will install or update an entire tree assumed to contain a set of interrelated modules.

module: The main module to be updated.
...: Any extra modules to be updated.

Returns

A proc that can be passed to occ-install-or-update.

Description

The returned installer proc, when run, will check all of the requested modules, and if any of them are out of date, then all important modules will be updated.

The important modules are the ones supplied to the call to occ-module-installer, plus any modules listed in the top level curl-modules.txt which have been installed previously.

To update a module, if the module has not changed since the previous update, it will be kept as it was, and otherwise, if a non-empty curl-contents.txt file exists on the webserver, then the files it lists will be acquired from the webserver, and otherwise, the curl-archive.car file on the webserver will be extracted. This is similar to the steps taken by occ-root-installer.

Notes

The deployment tool in the IDE can be used to generate the curl-modules.txt, curl-archive.car, and curl-timestamp.txt files.

Also, the necessary files can be generated by hand by first calling exactly one of create-curl-contents-file or create-curl-archive-file, and then calling create-curl-modules-file if needed, and then calling create-curl-timestamp-file. Make sure to use a clean temporary directory, or to first delete any files created by previous calls to these procedures.