mirror of
https://github.com/packwiz/packwiz.git
synced 2025-04-19 21:16:30 +02:00
33 lines
598 B
Go
33 lines
598 B
Go
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
|
|
},
|
|
}
|