API Docs
Downloads.download
— Methoddownload(d::Download)
Download the file specified by the Download
object d
.
Installer.addprogramfile
— Methodaddprogramfile(fname)
Include a Julia source file containing program install configurations in the Programs
submodule.
Installer.addprograms
— Methodaddprograms(dir)
Include all Julia source files in a directory to the program install configurations in the Programs
submodule.
Installer.attempt
— Methodattempt(𝒻, gr::GitRepo)
Run the function 𝒻
taking the URL of the repo gr
as an argument. If execution fails with a ProcessFailedException
, 𝒻
will be run again but with the fallback URL provided instead. Such a failure will also cause the GitRepo
to prefer the fallback.
Calling this function on a GitRepo
with prefer_fallback
will use the fallback and will not re-attempt a failure.
Installer.checkout
— Methodcheckout(gr::GitRepo)
Checkout the specified branch of the GitRepo
. If the repo does not exist locally clone(gr)
will be run first.
Installer.clone
— Methodclone(gr::GitRepo; replace=false)
Clone the gitrepo
. If replace
, will delete the existing directory, otherwise, this will fail if the GitRepo
destination exists.
Installer.diff
— Methoddiff(src, dst; confirm=isinteractive())
If confirm
, prompt the user whether they'd like to edit the diff between the files src
and dst
.
Installer.distro
— Methoddistro()
Return a Symbol
describing the current linux distribution. This is primarily used for selecting a package manager, so Manjaro and Arch are equivalent, as are debian and ubuntu.
Installer.dotfilesdir!
— Methoddotfilesdir!([dir])
Set the directory from which the configuration dotfiles will be installed. By default, this will be taken from the environment variable INSTALLER_DOTFILES_DIR
.
Installer.downloads
— Methoddownloads(p)
Perform all downloads for a Program
object.
Installer.getdistroinfo
— Methodgetdistroinfo()
Get a string which describes the current linux distribution. This is from scanning through /etc/
for files with -release
in the name.
Installer.hasfuse
— Methodhasfuse()
Determines whether the FUSE device is available. If false
, AppImages cannot be run without extracting.
Installer.help
— Methodhelp()
Display a useful help message. This is displayed when the package is started in interactive mode.
Installer.install
— Functioninstall(progs)
install(p)
Install a program or list of programs, performing all steps specified by that program's configuration. In interactive mode, installing a list of programs will prompt with a selection menu from that list.
Installer.install
— Methodinstall(p; confirm=isinteractive())
Install the program p
. If confirm
, the user will be asked for confirmation for potentially destructive actions such as overwriting files.
Installer.installconfig
— Methodinstallconfig(cfg)
Install the configuration file cfg
. This will copy it from the dotfilesdir()
source dir to the same relative path in HOME
.
Installer.installconfigs
— Functioninstallconfigs
Install all configs in a file, or all configs specified by a Program
object.
Installer.issudo
— Methodissudo()
Determines whether the current user has sudo
priveledges.
Installer.pminstall
— Methodpminstall(args...)
pminstall(p::Program)
Perform a package manager installation. Arguments will be provided to the standard package manager install.
Will prompt before running if in interactive mode. Will skip if not sudo.
Installer.pminstall_command
— Methodpminstall_command
Return the command for installing a program, depending on linux distro.
Installer.pmupdate_command
— Methodpmupdate_command
Return the command for performing a package manager update.
Installer.programs
— Methodprograms()
Get a list of all configured programs. This is obtained from a list of Program
objects in the Programs
submodule.
Installer.pull
— Methodpull(file; confirm=isinteractive())
Copy a file from the home directory to the dotfiles directroy. This is useful for updating the dotfiles repo after changes have been made to the file on the system. If confirm
and a file already exists, the user will be given the option whether to replace or edit a diff. The path of file
should be given relative to the home directory.
Installer.pull
— Methodpull(gr::GitRepo)
Pull the specified branch from origin
. If the repo does not exist locally clone(gr)
will be run first.
Installer.pullrepos
— Methodpullrepos(p)
Pull all repositories associated with the program config p
, cloning if necessary. This will be done with the git pull
command so any discrepancies need to be resolved manually later.
Installer.push
— Methodpush(file; confirm=isinteractive())
Copy a file from the dotfiles directory to the home directory. If confirm
and a file already exists, the user will be given the option to whether to replace or edit a diff. The path of file
should be given relative to the home directory.
Installer.runcommand
— Methodruncommand(cmd)
If in interactive mode, prompt whether or not a command should be run.
Installer.srcdstpaths
— Methodsrcdstpaths(fname)
Generate source and destination file names for dotfiles.