2020-02-19 05:18:36 +00:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2020-02-19 05:39:54 +00:00
|
|
|
"gitea.com/gpm/gpm/modules/config"
|
2020-02-19 05:18:36 +00:00
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
var Export = cli.Command{
|
|
|
|
Name: "export",
|
|
|
|
Usage: "Export local gpm packages",
|
|
|
|
Action: doExport,
|
|
|
|
}
|
|
|
|
|
|
|
|
func doExport(ctx *cli.Context) error {
|
|
|
|
|
2020-02-19 05:39:54 +00:00
|
|
|
export, err := config.Export()
|
2020-02-19 05:18:36 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2020-02-19 05:39:54 +00:00
|
|
|
fmt.Println(export)
|
2020-02-19 05:18:36 +00:00
|
|
|
return nil
|
|
|
|
}
|