Documentation ¶
Overview ¶
Package env captures details about the distri environment. Inspect the environment using `distri env`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRepo = func() string { if env := os.Getenv("DEFAULTREPO"); env != "" { return env } return join(DefaultRepoRoot, "pkg") }()
DefaultRepo is the default repository path or URL to pkg/.
View Source
var DefaultRepoRoot = func() string { if env := os.Getenv("DEFAULTREPOROOT"); env != "" { return env } return DistriRoot.BuildDir("distri") }()
DefaultRepoRoot is the default repository path or URL.
View Source
var DistriConfig = func() string { if env := os.Getenv("DISTRICFG"); env != "" { return env } return "/etc/distri" }()
DistriConfig is the directory containing distri config files (typically /etc/distri).
View Source
var DistriRoot = func() DistriRootDir { if env := os.Getenv("DISTRIROOT"); env != "" { return DistriRootDir(env) } return DistriRootDir(os.ExpandEnv("$HOME/distri")) }()
Functions ¶
Types ¶
type DistriRootDir ¶
type DistriRootDir string
DistriRoot is the root directory of where the distri repository was checked out.
func (*DistriRootDir) BuildDir ¶
func (d *DistriRootDir) BuildDir(pkg string) string
func (*DistriRootDir) PkgDir ¶
func (d *DistriRootDir) PkgDir(pkg string) string
Click to show internal directories.
Click to hide internal directories.