use_bbi.RdIdentifies system running and pulls the relevant tarball for the
current release of bbi from GitHub, and then installs it in the directory
passed to .dir. If used in an interactive session, will open an
installation menu confirming the installed version.
use_bbi(.path = NULL, .version = "latest", .force = FALSE, .quiet = FALSE)
| .path | absolute path to install bbi to. See Details section for defaults, if nothing is passed. |
|---|---|
| .version | version of bbi to install. Must pass a character scalar corresponding to a tag found in |
| .force | If |
| .quiet | If |
character
If nothing is passed to the .path argument, use_bbi() will
attempt to find a valid path for installation. The following decision
waterfall is used:
First, check getOption("bbr.bbi_exe_path"). If this is anything other
than "bbi" (the default value) then attempt to install to that path.
Second, check Sys.which("bbi") which will look for a bbi installation
in the user's $PATH. If one is found, ask the user if they wish to
overwrite it and, if they confirm, install to that path.
Third, attempt to install to a "default location" and add this location to
the user's $PATH. If Sys.getenv("XDG_DATA_HOME") is found, install to
{Sys.getenv("XDG_DATA_HOME")}/bbi/bbi (per XGD specification).
Otherwise, install to OS dependent defaults:
Linux: {Sys.getenv("HOME")}/.local/share/bbi/bbi
Mac: /usr/local/bin/bbi
Windows: {Sys.getenv("APPDATA")}\bbi\bbi
If none of these are successful, the user will be prompted to set
options("bbr.bbi_exe_path") and try again.