Example #1
0
func mfgLoad(mi *mfg.MfgImage) {
	binPath, err := mi.Upload()
	if err != nil {
		NewtUsage(nil, err)
	}

	util.StatusMessage(util.VERBOSITY_DEFAULT,
		"Uploaded manufacturing image: %s\n", binPath)
}
Example #2
0
func mfgCreate(mi *mfg.MfgImage) {
	pathStr := ""
	for _, path := range mi.FromPaths() {
		pathStr += "    * " + path + "\n"
	}

	util.StatusMessage(util.VERBOSITY_DEFAULT,
		"Creating a manufacturing image from the following files:\n%s\n",
		pathStr)

	outputPaths, err := mi.CreateMfgImage()
	if err != nil {
		NewtUsage(nil, err)
	}

	pathStr = ""
	for _, path := range outputPaths {
		pathStr += "    * " + path + "\n"
	}
	util.StatusMessage(util.VERBOSITY_DEFAULT,
		"Generated the following files:\n%s", pathStr)
}