예제 #1
0
파일: stop.go 프로젝트: goern/nulecule-go
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()
}
예제 #2
0
//installFunction is the function that begins the install process
func installFunction() func(cmd *Command, args []string) {
	return func(cmd *Command, args []string) {
		//Set up parameters
		argCount := len(args)
		if argCount <= 0 {
			logrus.Fatalf("Please provide a repository to install from.")
		}
		app := args[0]
		flags := cmd.FlagSet
		target := getVal(flags, "destination").(string)
		b := nulecule.New(target, app)
		b.Install()
	}
}
예제 #3
0
func stopFunction() func(cmd *Command, args []string) {
	return func(cmd *Command, args []string) {
		//Set up parameters
		var (
			app    string
			target string
		)
		if len(args) > 0 {
			target = args[0]
		}
		base := nulecule.New(target, app)
		base.Stop()
	}
}
예제 #4
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()
}
예제 #5
0
파일: run.go 프로젝트: goern/nulecule-go
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)
}
예제 #6
0
파일: run.go 프로젝트: aweiteka/nulecule-go
func runFunction() func(cmd *Command, args []string) {
	return func(cmd *Command, args []string) {
		//Set up parameters
		var (
			app    string
			target string
		)
		if len(args) > 0 {
			target = args[0]
		}
		flags := cmd.FlagSet
		ask := getVal(flags, "ask").(bool)
		answersFile := getVal(flags, "write").(string)
		//Start run sequence
		base := nulecule.New(target, app)
		base.Run(ask, answersFile)
	}
}