Example #1
0
func install(c *cli.Context) {
	spawn.SetBaseDirectory("") // Default to usr.homedir.
	tp := spawn.NewThrustProvisioner()
	if err := tp.Provision(); err != nil {
		panic(err)
	}
	fmt.Println("Thrust installed")
}
Example #2
0
func (prov ThrustProvisioner) Provision() error {
	basedir := filepath.Join(os.TempDir(), "guivbrdc")
	os.Mkdir(basedir, os.ModeDir)
	thrustspawn.SetBaseDirectory(basedir)
	if executableNotExist() {
		return prov.extractToPath(thrustspawn.GetThrustDirectory())
	}
	return nil
}
func (tp TutorialProvisioner) Provision() error {
	spawn.SetBaseDirectory("") // Means use the users home directory
	return spawn.Bootstrap()

}