Renamed floppy_contents to floppy_dirs as requested by rickard.von.essen@gmail.com

This commit is contained in:
Ali Rizvi-Santiago 2016-09-12 12:07:35 -05:00
parent 915b7f371a
commit fbe305cf4e
10 changed files with 12 additions and 12 deletions

View File

@ -9,7 +9,7 @@ import (
type FloppyConfig struct { type FloppyConfig struct {
FloppyFiles []string `mapstructure:"floppy_files"` FloppyFiles []string `mapstructure:"floppy_files"`
FloppyContents []string `mapstructure:"floppy_contents"` FloppyContents []string `mapstructure:"floppy_dirs"`
} }
func (c *FloppyConfig) Prepare(ctx *interpolate.Context) []error { func (c *FloppyConfig) Prepare(ctx *interpolate.Context) []error {

View File

@ -165,7 +165,7 @@ func (s *StepCreateFloppy) Run(state multistep.StateBag) multistep.StepAction {
ui.Message("Done copying files from floppy_files") ui.Message("Done copying files from floppy_files")
// Collect all paths (expanding wildcards) into pathqueue // Collect all paths (expanding wildcards) into pathqueue
ui.Message("Collecting paths from floppy_contents") ui.Message("Collecting paths from floppy_dirs")
var pathqueue []string var pathqueue []string
for _,filename := range s.Contents { for _,filename := range s.Contents {
if strings.IndexAny(filename, "*?[") >= 0 { if strings.IndexAny(filename, "*?[") >= 0 {
@ -182,7 +182,7 @@ func (s *StepCreateFloppy) Run(state multistep.StateBag) multistep.StepAction {
} }
pathqueue = append(pathqueue, filename) pathqueue = append(pathqueue, filename)
} }
ui.Message(fmt.Sprintf("Resulting paths from floppy_contents : %v", pathqueue)) ui.Message(fmt.Sprintf("Resulting paths from floppy_dirs : %v", pathqueue))
// Go over each path in pathqueue and copy it. // Go over each path in pathqueue and copy it.
for _,src := range pathqueue { for _,src := range pathqueue {
@ -193,7 +193,7 @@ func (s *StepCreateFloppy) Run(state multistep.StateBag) multistep.StepAction {
return multistep.ActionHalt return multistep.ActionHalt
} }
} }
ui.Message("Done copying paths from floppy_contents") ui.Message("Done copying paths from floppy_dirs")
// Set the path to the floppy so it can be used later // Set the path to the floppy so it can be used later
state.Put("floppy_path", s.floppyPath) state.Put("floppy_path", s.floppyPath)

View File

@ -294,7 +294,7 @@ func TestStepCreateFloppyContents(t *testing.T) {
for _,c := range test.contents { for _,c := range test.contents {
step.Contents = append(step.Contents, filepath.Join(dir,filepath.FromSlash(c))) step.Contents = append(step.Contents, filepath.Join(dir,filepath.FromSlash(c)))
} }
log.Println(fmt.Sprintf("Trying against floppy_contents : %v",step.Contents)) log.Println(fmt.Sprintf("Trying against floppy_dirs : %v",step.Contents))
// run the step // run the step
if action := step.Run(state); action != multistep.ActionContinue { if action := step.Run(state); action != multistep.ActionContinue {

View File

@ -115,7 +115,7 @@ builder.
and \[\]) are allowed. Directory names are also allowed, which will add all and \[\]) are allowed. Directory names are also allowed, which will add all
the files found in the directory to the floppy. the files found in the directory to the floppy.
- `floppy_contents` (array of strings) - A list of directories to place onto - `floppy_dirs` (array of strings) - A list of directories to place onto
the floppy disk recursively. This is similar to the `floppy_files` option the floppy disk recursively. This is similar to the `floppy_files` option
except that the directory structure is preserved. This is useful for when except that the directory structure is preserved. This is useful for when
your floppy disk includes drivers or if you just want to organize it's your floppy disk includes drivers or if you just want to organize it's

View File

@ -86,7 +86,7 @@ builder.
listed in this configuration will all be put into the root directory of the listed in this configuration will all be put into the root directory of the
floppy disk; sub-directories are not supported. floppy disk; sub-directories are not supported.
- `floppy_contents` (array of strings) - A list of directories to place onto - `floppy_dirs` (array of strings) - A list of directories to place onto
the floppy disk recursively. This is similar to the `floppy_files` option the floppy disk recursively. This is similar to the `floppy_files` option
except that the directory structure is preserved. This is useful for when except that the directory structure is preserved. This is useful for when
your floppy disk includes drivers or if you just want to organize it's your floppy disk includes drivers or if you just want to organize it's

View File

@ -164,7 +164,7 @@ Linux server and have not enabled X11 forwarding (`ssh -X`).
and \[\]) are allowed. Directory names are also allowed, which will add all and \[\]) are allowed. Directory names are also allowed, which will add all
the files found in the directory to the floppy. the files found in the directory to the floppy.
- `floppy_contents` (array of strings) - A list of directories to place onto - `floppy_dirs` (array of strings) - A list of directories to place onto
the floppy disk recursively. This is similar to the `floppy_files` option the floppy disk recursively. This is similar to the `floppy_files` option
except that the directory structure is preserved. This is useful for when except that the directory structure is preserved. This is useful for when
your floppy disk includes drivers or if you just want to organize it's your floppy disk includes drivers or if you just want to organize it's

View File

@ -150,7 +150,7 @@ builder.
and \[\]) are allowed. Directory names are also allowed, which will add all and \[\]) are allowed. Directory names are also allowed, which will add all
the files found in the directory to the floppy. the files found in the directory to the floppy.
- `floppy_contents` (array of strings) - A list of directories to place onto - `floppy_dirs` (array of strings) - A list of directories to place onto
the floppy disk recursively. This is similar to the `floppy_files` option the floppy disk recursively. This is similar to the `floppy_files` option
except that the directory structure is preserved. This is useful for when except that the directory structure is preserved. This is useful for when
your floppy disk includes drivers or if you just want to organize it's your floppy disk includes drivers or if you just want to organize it's

View File

@ -132,7 +132,7 @@ builder.
and \[\]) are allowed. Directory names are also allowed, which will add all and \[\]) are allowed. Directory names are also allowed, which will add all
the files found in the directory to the floppy. the files found in the directory to the floppy.
- `floppy_contents` (array of strings) - A list of directories to place onto - `floppy_dirs` (array of strings) - A list of directories to place onto
the floppy disk recursively. This is similar to the `floppy_files` option the floppy disk recursively. This is similar to the `floppy_files` option
except that the directory structure is preserved. This is useful for when except that the directory structure is preserved. This is useful for when
your floppy disk includes drivers or if you just want to organize it's your floppy disk includes drivers or if you just want to organize it's

View File

@ -125,7 +125,7 @@ builder.
and \[\]) are allowed. Directory names are also allowed, which will add all and \[\]) are allowed. Directory names are also allowed, which will add all
the files found in the directory to the floppy. the files found in the directory to the floppy.
- `floppy_contents` (array of strings) - A list of directories to place onto - `floppy_dirs` (array of strings) - A list of directories to place onto
the floppy disk recursively. This is similar to the `floppy_files` option the floppy disk recursively. This is similar to the `floppy_files` option
except that the directory structure is preserved. This is useful for when except that the directory structure is preserved. This is useful for when
your floppy disk includes drivers or if you just want to organize it's your floppy disk includes drivers or if you just want to organize it's

View File

@ -83,7 +83,7 @@ builder.
and \[\]) are allowed. Directory names are also allowed, which will add all and \[\]) are allowed. Directory names are also allowed, which will add all
the files found in the directory to the floppy. the files found in the directory to the floppy.
- `floppy_contents` (array of strings) - A list of directories to place onto - `floppy_dirs` (array of strings) - A list of directories to place onto
the floppy disk recursively. This is similar to the `floppy_files` option the floppy disk recursively. This is similar to the `floppy_files` option
except that the directory structure is preserved. This is useful for when except that the directory structure is preserved. This is useful for when
your floppy disk includes drivers or if you just want to organize it's your floppy disk includes drivers or if you just want to organize it's