diff --git a/.gitignore b/.gitignore index 2b666ef..0335fb3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ anydb *.db coverage.out *.json +releases diff --git a/Makefile b/Makefile index fbbf7b9..4eaf482 100644 --- a/Makefile +++ b/Makefile @@ -43,12 +43,12 @@ ifdef HAVE_POD echo "var manpage = \`" >> cmd/$*.go pod2text $*.pod >> cmd/$*.go echo "\`" >> cmd/$*.go - - echo "var usage = \`" >> cmd/$*.go - awk '/SYNOPS/{f=1;next} /DESCR/{f=0} f' $*.pod | sed 's/^ //' >> cmd/$*.go - echo "\`" >> cmd/$*.go endif +# echo "var usage = \`" >> cmd/$*.go +# awk '/SYNOPS/{f=1;next} /DESCR/{f=0} f' $*.pod | sed 's/^ //' >> cmd/$*.go +# echo "\`" >> cmd/$*.go + buildlocal: go build -ldflags "-X 'github.com/tlinden/anydb/cfg.VERSION=$(VERSION)'" diff --git a/app/db.go b/app/db.go index 94a8453..450a3d1 100644 --- a/app/db.go +++ b/app/db.go @@ -38,7 +38,9 @@ const BucketData string = "data" func New(file string, debug bool) (*DB, error) { if _, err := os.Stat(filepath.Dir(file)); os.IsNotExist(err) { - os.MkdirAll(filepath.Dir(file), 0700) + if err := os.MkdirAll(filepath.Dir(file), 0700); err != nil { + return nil, err + } } return &DB{Debug: debug, Dbfile: file}, nil diff --git a/output/list.go b/output/list.go index 429608a..a824ad7 100644 --- a/output/list.go +++ b/output/list.go @@ -27,8 +27,6 @@ func List(writer io.Writer, conf *cfg.Config, entries app.DbEntries) error { default: return errors.New("unsupported mode") } - - return nil } func ListJson(writer io.Writer, conf *cfg.Config, entries app.DbEntries) error {