diff options
Diffstat (limited to 'pkg/rtree/main.go')
| -rw-r--r-- | pkg/rtree/main.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/rtree/main.go b/pkg/rtree/main.go index 2a85ab9..4c8fb98 100644 --- a/pkg/rtree/main.go +++ b/pkg/rtree/main.go @@ -55,7 +55,10 @@ func Exec(args []string) { } commandRemotes() case "import": - panic("unimplemented") + if len(args) != 2 { + usageAndExit() + } + commandImport(args[1]) case "each": if len(args) < 2 { usageAndExit() @@ -124,3 +127,9 @@ func commandEach(command string, args []string) { os.Exit(1) } } + +func commandImport(dirPath string) { + index := ReadIndex() + index.InteractiveImportRepo(dirPath) + index.Write() +} |
