2013-12-22 14:50:29 -05:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
2017-04-04 16:39:01 -04:00
|
|
|
"github.com/hashicorp/packer/template/interpolate"
|
2013-12-22 14:50:29 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
type VBoxVersionConfig struct {
|
2017-03-16 21:04:36 -04:00
|
|
|
VBoxVersionFile *string `mapstructure:"virtualbox_version_file"`
|
2013-12-22 14:50:29 -05:00
|
|
|
}
|
|
|
|
|
2015-05-27 17:01:08 -04:00
|
|
|
func (c *VBoxVersionConfig) Prepare(ctx *interpolate.Context) []error {
|
2017-03-16 21:04:36 -04:00
|
|
|
if c.VBoxVersionFile == nil {
|
|
|
|
default_file := ".vbox_version"
|
|
|
|
c.VBoxVersionFile = &default_file
|
2013-12-22 14:50:29 -05:00
|
|
|
}
|
|
|
|
|
2015-05-27 17:01:08 -04:00
|
|
|
return nil
|
2013-12-22 14:50:29 -05:00
|
|
|
}
|