diff --git a/Makefile b/Makefile index 96dd6b0..a58cd39 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ BINDIR ?= ${PREFIX}/bin MANDIR ?= ${PREFIX}/man DATE ?= `date -u +%F` GOOS ?= `${GO} env GOOS` -VERSION ?= 1.0G+${REV} +VERSION ?= 1.0H+${REV} REV ?= `svn info --show-item revision || git rev-list --all | wc -l` build: ${GO} build ${GOFLAGS} ./cmd/aya diff --git a/cmd/aya/buildall.go b/cmd/aya/buildall.go index 690c31a..ded3712 100644 --- a/cmd/aya/buildall.go +++ b/cmd/aya/buildall.go @@ -38,7 +38,7 @@ func buildAll(watch bool) { run(vars, "prehook") modified = true } - fmt.Println("GEN", path) + fmt.Println(path) return build(path, nil, vars) } return nil diff --git a/cmd/aya/main.go b/cmd/aya/main.go index 660c4ac..391a3d0 100644 --- a/cmd/aya/main.go +++ b/cmd/aya/main.go @@ -50,7 +50,12 @@ func main() { case "help": aya.PrintUsage() case "serve": - aya.HttpServe(PUBDIR, 8000) + d, err := os.Stat(PUBDIR) + if err != nil { + log.Fatal("[aya.HttpServe] I see, you want me to serve a non-existent directory, huh?") + } else { + aya.HttpServe(fmt.Sprint(d), 8000) + } case "var": if len(args) == 0 { log.Fatal("[var] Filename expected")