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() }
//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() } }
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() } }
//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() }
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) }
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) } }