MCPcopy Index your code
hub / github.com/celer-pkg/celer / Install

Method Install

buildsystems/build_custom.go:117–140  ·  view source on GitHub ↗
(options []string)

Source from the content-addressed store, hash-verified

115}
116
117func (c custom) Install(options []string) error {
118 toolchain := c.Ctx.Platform().GetToolchain()
119 rootfs := c.Ctx.Platform().GetRootFS()
120
121 if len(c.CustomInstall) > 0 {
122 // msvc and clang-cl need to set build environment event in dev mode.
123 if (c.DevDep || c.HostDev) && toolchain.GetName() != "msvc" && toolchain.GetName() != "clang-cl" {
124 toolchain.ClearEnvs()
125 } else {
126 toolchain.SetEnvs(rootfs, c.Name(), c.Envs)
127 }
128
129 scripts := strings.Join(c.CustomInstall, " && ")
130 scripts = c.expandVariables(scripts)
131 title := fmt.Sprintf("[install %s]", c.PortConfig.nameVersion())
132 executor := cmd.NewExecutor(title, scripts)
133 executor.SetLogPath(c.getLogPath("install"))
134 executor.SetWorkDir(expr.If(c.BuildInSource, c.PortConfig.SrcDir, c.PortConfig.BuildDir))
135 if err := executor.Execute(); err != nil {
136 return err
137 }
138 }
139 return nil
140}

Callers

nothing calls this directly

Calls 15

NameMethod · 0.95
NewExecutorFunction · 0.92
IfFunction · 0.92
expandVariablesMethod · 0.80
SprintfMethod · 0.80
nameVersionMethod · 0.80
SetLogPathMethod · 0.80
SetWorkDirMethod · 0.80
ExecuteMethod · 0.80
GetToolchainMethod · 0.65
PlatformMethod · 0.65
GetRootFSMethod · 0.65

Tested by

no test coverage detected