autorestic/cmd/install.go

20 lines
340 B
Go
Raw Permalink Normal View History

2021-04-11 11:04:11 +00:00
package cmd
import (
"github.com/cupcakearmy/autorestic/internal/bins"
"github.com/spf13/cobra"
)
var installCmd = &cobra.Command{
Use: "install",
2021-04-11 11:08:50 +00:00
Short: "Install restic if missing",
2021-04-11 11:04:11 +00:00
Run: func(cmd *cobra.Command, args []string) {
err := bins.InstallRestic()
CheckErr(err)
2021-04-11 11:04:11 +00:00
},
}
func init() {
rootCmd.AddCommand(installCmd)
}