func installHost(i *config.InstallConfig, b *config.BuildConfig, host string) error { // Prepare shell script t := template.New("_") template.Must(t.Parse(installShSrc)) var w bytes.Buffer if err := t.Execute(&w, &struct{ BinDir, JailDir, VarDir string }{ BinDir: i.BinDir(), JailDir: i.JailDir(), VarDir: i.VarDir(), }); err != nil { return err } install_sh := string(w.Bytes()) // Execute remotely if _, _, err := posix.RemoteShell(host, install_sh); err != nil { return err } if err := posix.UploadDir(host, b.ShipDir, i.BinDir()); err != nil { return err } return nil }