Mix v1.3.2 Mix.Tasks.Escript.Install

Installs an escript locally.

If no argument is supplied but there is an escript in the project’s root directory (created with mix escript.build), then the escript will be installed locally. For example:

mix do escript.build, escript.install

If an argument is provided, it should be a local path or a URL to a prebuilt escript.

mix escript.install escript
mix escript.install path/to/escript
mix escript.install https://example.com/myescript

After installation, the escript can be invoked as

~/.mix/escripts/foo

For convenience, consider adding ~/.mix/escripts directory to your PATH environment variable. For more information, check the wikipedia article on PATH: https://en.wikipedia.org/wiki/PATH_(variable)

Command line options

  • --sha512 - checks the escript matches the given SHA-512 checksum

  • --force - forces installation without a shell prompt; primarily intended for automation in build systems like make

Summary

Functions

check_path_or_url()

Callback implementation for Mix.Local.Installer.check_path_or_url/1.

find_previous_versions(src, dst)

Callback implementation for Mix.Local.Installer.find_previous_versions/2.

install(dst, binary, previous)

Callback implementation for Mix.Local.Installer.install/3.

run(argv)

Specs

run(OptionParser.argv) :: boolean

Callback implementation for Mix.Task.run/1.