gocage fetch finished
This commit is contained in:
11
cmd/root.go
11
cmd/root.go
@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
gVersion = "0.31"
|
||||
gVersion = "0.32a"
|
||||
|
||||
// TODO : Get from $jail_zpool/defaults.json
|
||||
MIN_DYN_DEVFS_RULESET = 1000
|
||||
@ -53,6 +53,7 @@ var (
|
||||
|
||||
gFetchRelease string
|
||||
gFetchIntoDS string
|
||||
gFetchFrom string
|
||||
|
||||
|
||||
rootCmd = &cobra.Command{
|
||||
@ -293,7 +294,12 @@ You can specify multiple datastores.`,
|
||||
Use: "fetch",
|
||||
Short: "Fetch FreeBSD release to local datastore",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fetchRelease(gFetchRelease, "http", gJailHost.arch, gFetchIntoDS)
|
||||
err := fetchRelease(gFetchRelease, "http", gJailHost.arch, gFetchIntoDS, gFetchFrom)
|
||||
if err != nil {
|
||||
fmt.Printf("%v\n", err)
|
||||
} else {
|
||||
extractRelease(gFetchRelease, gFetchIntoDS)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@ -352,6 +358,7 @@ func init() {
|
||||
|
||||
fetchCmd.Flags().StringVarP(&gFetchRelease, "release", "r", "", "Release to fetch (e.g.: \"13.1\"")
|
||||
fetchCmd.Flags().StringVarP(&gFetchIntoDS, "datastore", "o", "", "Datastore release will be saved to")
|
||||
fetchCmd.Flags().StringVarP(&gFetchFrom, "from", "d", "", "Repository to download from. Should contain XY.Z-RELEASE. File protocol supported")
|
||||
fetchCmd.MarkFlagRequired("release")
|
||||
fetchCmd.MarkFlagRequired("datastore")
|
||||
|
||||
|
Reference in New Issue
Block a user