exe

package
Version: v11.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SudoLoopDuration = 241

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdBuilder

type CmdBuilder struct {
	GitBin           string
	GitFlags         []string
	MakepkgFlags     []string
	MakepkgConfPath  string
	MakepkgBin       string
	SudoBin          string
	SudoFlags        []string
	SudoLoopEnabled  bool
	PacmanBin        string
	PacmanConfigPath string
	PacmanDBPath     string
	Runner           Runner
}

func (*CmdBuilder) AddMakepkgFlag

func (c *CmdBuilder) AddMakepkgFlag(flag string)

func (*CmdBuilder) BuildGitCmd

func (c *CmdBuilder) BuildGitCmd(ctx context.Context, dir string, extraArgs ...string) *exec.Cmd

func (*CmdBuilder) BuildMakepkgCmd

func (c *CmdBuilder) BuildMakepkgCmd(ctx context.Context, dir string, extraArgs ...string) *exec.Cmd

func (*CmdBuilder) BuildPacmanCmd

func (c *CmdBuilder) BuildPacmanCmd(ctx context.Context, args *parser.Arguments, mode parser.TargetMode, noConfirm bool) *exec.Cmd

func (*CmdBuilder) Capture

func (c *CmdBuilder) Capture(cmd *exec.Cmd) (stdout, stderr string, err error)

func (*CmdBuilder) SetPacmanDBPath

func (c *CmdBuilder) SetPacmanDBPath(dbPath string)

func (*CmdBuilder) Show

func (c *CmdBuilder) Show(cmd *exec.Cmd) error

func (*CmdBuilder) SudoLoop

func (c *CmdBuilder) SudoLoop()

type GitCmdBuilder

type GitCmdBuilder interface {
	Runner
	BuildGitCmd(ctx context.Context, dir string, extraArgs ...string) *exec.Cmd
}

type ICmdBuilder

type ICmdBuilder interface {
	Runner
	BuildGitCmd(ctx context.Context, dir string, extraArgs ...string) *exec.Cmd
	BuildMakepkgCmd(ctx context.Context, dir string, extraArgs ...string) *exec.Cmd
	BuildPacmanCmd(ctx context.Context, args *parser.Arguments, mode parser.TargetMode, noConfirm bool) *exec.Cmd
	AddMakepkgFlag(string)
	SetPacmanDBPath(string)
	SudoLoop()
}

type OSRunner

type OSRunner struct{}

func (*OSRunner) Capture

func (r *OSRunner) Capture(cmd *exec.Cmd) (stdout, stderr string, err error)

func (*OSRunner) Show

func (r *OSRunner) Show(cmd *exec.Cmd) error

type Runner

type Runner interface {
	Capture(cmd *exec.Cmd) (stdout string, stderr string, err error)
	Show(cmd *exec.Cmd) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL