diff --git a/curseforge/export.go b/curseforge/export.go new file mode 100644 index 0000000..7e951a9 --- /dev/null +++ b/curseforge/export.go @@ -0,0 +1,32 @@ +package curseforge + +import ( + "fmt" + "os" + + "github.com/comp500/packwiz/core" + "github.com/spf13/cobra" +) + +// exportCmd represents the export command +var exportCmd = &cobra.Command{ + Use: "export", + Short: "Export the current modpack into a .zip for curseforge", + // TODO: argument for file name + Args: cobra.NoArgs, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("Loading modpack...") + pack, err := core.LoadPack() + if err != nil { + fmt.Println(err) + os.Exit(1) + } + index, err := pack.LoadIndex() + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + _ = index + }, +}