You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
backy/cmd/backup.go

29 lines
638 B

package cmd
import (
"git.andrewnw.xyz/CyberShell/backy/pkg/backy"
"github.com/spf13/cobra"
)
var (
backupCmd = &cobra.Command{
Use: "backup [--commands==list1,list2]",
Short: "Runs commands defined in config file.",
Long: `Backup executes commands defined in config file,
use the -cmds flag to execute the specified commands.`,
}
)
var CmdList *[]string
func init() {
cobra.OnInitialize(initConfig)
backupCmd.Flags().StringSliceVarP(CmdList, "commands", "cmds", nil, "Accepts a comma-separated list of command lists to execute.")
}
func backup() {
backyConfig := backy.NewOpts(cfgFile)
backyConfig.GetConfig()
}