Module unicorn.remote¶
Functions for installing packages from a package remote.
Index¶
Function
Installs a package from a remote. |
Api reference¶
-
unicorn.remote.install(package_name:
string):nil¶ Installs a package from a remote.
This function traverses
/rom/config/unicorn/remotesand then/etc/unicorn/remotesfor alltxtfiles that contain URLs to a [package remote](https://unicornpkg.github.io/spec/v1.0.0/package-remotes.html).For each remote, it tries requesting the remote’s URL plus the package’s name. If it fails with a
Not Founderror, it moves on. If it gets a good response, then it installs the package.Example¶
Installs MCJack123’s AUKit, assuming a remote hosting it is configured. >>> local unicorn = require(“unicorn”) >>> unicorn.remote.install(“aukit”)
- Parameters:
package_name (
string) – The name of the package