1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-12-22 22:06:29 +00:00

WIP
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2024-12-14 08:34:19 -05:00
parent 7c33cb7d95
commit fcacdf01e7
Signed by: vbatts
GPG key ID: E30EFAA812C6E5ED
3 changed files with 23 additions and 2 deletions

View file

@ -2,11 +2,10 @@
BUILD := gomtree
BUILDPATH := github.com/vbatts/go-mtree/cmd/gomtree
CWD := $(shell pwd)
SOURCE_FILES := $(shell find . -type f -name "*.go")
SOURCE_FILES = $(shell find . -type f -name "*.go")
CLEAN_FILES := *~
TAGS :=
ARCHES := linux,386 linux,amd64 linux,arm linux,arm64 linux,mips64 linux,riscv64 openbsd,amd64 windows,amd64 windows,arm64 darwin,amd64 darwin,arm64
GO_VER := go1.14
default: build validation

View file

@ -0,0 +1,21 @@
package cmd
import (
cli "github.com/urfave/cli/v2"
)
func NewMtree2JsonCommand() *cli.Command {
return &cli.Command{
Name: "mtree2json,",
Usage: "represent an mtree as JSON format",
Aliases: []string{"m2j"},
Action: validateAction,
Flags: []cli.Flag{
&cli.StringSliceFlag{
Name: "file",
Aliases: []string{"f"},
Usage: "Directory hierarchy spec to validate",
},
},
}
}

View file

@ -42,6 +42,7 @@ to support xattrs and interacting with tar archives.`
}
app.Commands = []*cli.Command{
cmd.NewValidateCommand(),
cmd.NewMtree2JsonCommand(),
}
// Unfortunately urfave/cli is not at good at using DefaultCommand