Fix prefix bug in copier.

This commit is contained in:
monopole
2021-02-08 14:39:25 -08:00
parent 94d06e1e18
commit 1df430255a
5 changed files with 32 additions and 24 deletions

View File

@@ -34,11 +34,11 @@ import (
)
func main() {
if len(os.Args) < 2 {
log.Fatal("Need name of yaml file containing module specs.")
if len(os.Args) < 3 {
log.Fatal("Need name of yaml file containing module specs and prefix.")
}
spec := internal.ReadSpec(os.Args[1])
c := internal.NewCopier(spec)
c := internal.NewCopier(spec, os.Args[2])
internal.RunNoOutputCommand("go", "get", spec.Name())
for _, p := range spec.Packages {
for _, n := range p.Files {