[][src]Crate reups_lib

reups_lib is the main library for the reups package management system. It contains all the functionality used by the reups application. Any application wishing to make use of reups functionality should link to this library.


pub use clap::ArgMatches;





Database object that library consumers interact though. This DB encodes all the relations between products, versions, tags, and tables that are encoded in the filesystem besed database.


Structure which is responsible processing input from the std log api. It's members are the highest log level to output, and if the output should be sent to stdandard error instead of standard out.



Enum to describe what types of DBFiles should be loaded at DB creation time.



This function is responsible for creating all the possible command line options and arguments for the main program, and each of the sub commands.


Builds and initializes a logging object with options from the command line and the stderr boolean which is governed by the context of the subcommand that initiates the logger.


Prepping the environment to use reups involves adding functions to the users shell. The string returned from this function adds various components (at this point only rsetup) to the users environment. The resulting string must be eval-ed by the user, most commonly done with eval $(reups prep)


Builds and returns the sub command struct, containing all the options for the setup command


This is the main entry point for the env sub command. This command is used to save and restore the (r)eups managed environment that is setup in the current shell. This function has different effects based on the sub command argument supplied. The save argument will write out the current environment either named default, or with the optinally supplied name. A convienence shell function called rsave is supplied by reups prep to do the same task with less typing. The list subcommand will list all the environments previously saved. If the delete argument is supplied, the given named environment will be discarded, note the default environment cannot be deleted. The restore argument is used by this program to reconstruct the chosen environment. Because of the limitations of working with shells, the user should interact with this though the shell function rrestore that is supplied with the reups prep command.


Returns the eups system path as determined from the EUPS_PATH environment variable.


Returns the path to a user database, defined in users home directory, if one is present.


Lists info about products defined in the product database


This is the main argument parser for the reups program. It parses the arguments from the command line into a ArgMatches object containing all the supplied options.


This function takes in arguments parsed from the command line, parses them for products to setup and options to use during the setup, and sets up the specified product in the environment.


The completions subcommand invokes this function with the shell variable parsed from the command line. It is responsible for generating the corresponding shell completion scripts for the supplied shell.