2024-12-28 10:30:36 +00:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// Used for flags.
|
2024-12-29 08:19:24 +00:00
|
|
|
storagePath string
|
2024-12-28 10:30:36 +00:00
|
|
|
|
|
|
|
rootCmd = &cobra.Command{
|
|
|
|
Use: "zerkalo",
|
2024-12-29 08:19:24 +00:00
|
|
|
Short: "Efficiently mirror Linux distribution repositories",
|
|
|
|
Long: `zerkalo is a CLI program that allows its users to mirror.
|
|
|
|
Linux distribution repositories such as apt, or yum. It lets users easily
|
|
|
|
snapshot repositories per day and deduplicates as much content as it can.`,
|
2024-12-28 10:30:36 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
// Execute executes the root command.
|
|
|
|
func Execute() error {
|
|
|
|
return rootCmd.Execute()
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2024-12-29 08:19:24 +00:00
|
|
|
rootCmd.PersistentFlags().StringVarP(&storagePath, "storage-path", "p", "", "zerkalo storage path")
|
2024-12-28 10:30:36 +00:00
|
|
|
}
|