Translates a plan (or a package vector that can be resolved to a plan) into shell commands appropriate for the platform's package manager.
Arguments
- x
A
sysreqr_planor package vector.- platform
Platform specification accepted by
resolve_platform().- sudo
Whether to prefix commands with
sudo.- update
Whether to include the package manager update command when appropriate.
- missing_only
Whether to include only packages not known to be installed.
- ...
Passed to
check_packages()whenxis not a plan.
See also
Other commands:
admin_request(),
dockerfile(),
github_actions()
Examples
plan <- check_packages(c("xml2", "curl"), platform = "ubuntu-22.04")
install_command(plan)
#> [1] "sudo apt-get update"
#> [2] "sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev"
install_command(plan, sudo = FALSE, update = FALSE)
#> [1] "apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev"
