diff options
Diffstat (limited to 'adopt.go')
-rw-r--r-- | adopt.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -7,21 +7,21 @@ import ( "path/filepath" ) -func adopt(args []string) error { +func adopt(conf *Conf, args []string) error { if len(args) < 1 { return errors.New("must specify at least one file to adopt") } for _, name := range args { - if err := adoptFile(name); err != nil { + if err := adoptFile(conf, name); err != nil { return err } } return nil } -func adoptFile(name string) error { - fromPath := filepath.Join(dest, name) - toPath := filepath.Join(base, "templates", name) +func adoptFile(conf *Conf, name string) error { + fromPath := filepath.Join(conf.Dest, name) + toPath := filepath.Join(conf.Source, "templates", name) if err := os.MkdirAll(filepath.Dir(toPath), 0700); err != nil { return err } |