Exemplo n.º 1
0
func stopFunction(c *cli.Context) {
	//Set up parameters
	var (
		app    string
		target string
	)
	dryRun := c.GlobalBool("dry-run")
	base := nulecule.New(target, app, dryRun)
	base.Stop()
}
Exemplo n.º 2
0
//installFunction is the function that begins the install process
func installFunction(c *cli.Context) {
	//Set up parameters
	if len(c.Args()) < 1 {
		cli.ShowCommandHelp(c, "install")
		logrus.Fatalf("Please provide a repository to install from.")
	}
	app := c.Args()[0]
	dryRun := c.GlobalBool("dry-run")
	nodeps := c.Bool("no-deps")

	target := c.String("destination")
	b := nulecule.New(target, app, dryRun)
	b.Nodeps = nodeps
	b.Install()
}
Exemplo n.º 3
0
func runFunction(c *cli.Context) {
	//Set up parameters
	var (
		app    string
		target string
	)
	ask := c.Bool("ask")
	answersFile := c.String("write")
	dryRun := c.GlobalBool("dry-run")

	if len(c.Args()) >= 1 {
		target = c.Args()[0]
	}
	//Start run sequence
	base := nulecule.New(target, app, dryRun)
	base.Run(ask, answersFile)
}