aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2020-02-06 14:14:03 -0500
committerBen Burwell <ben@benburwell.com>2020-02-06 14:14:03 -0500
commitaf20f5d77577ecbc0b0319cbb8a11748cc8f5db8 (patch)
tree574decb4920ec285bca8e8ec2f8fe07276d7e284
parent3e75f88d804598041dbcf4f3139d91c283acdeef (diff)
Add man page
-rw-r--r--.gitignore1
-rw-r--r--Makefile16
-rw-r--r--doc/wx.1.scd14
3 files changed, 28 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 0286619..7525355 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
wxcli
wx
+wx.1
diff --git a/Makefile b/Makefile
index b9a7829..e24cb3a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,14 @@
-SOURCES=$(wildcard *.go) $(wildcard */*.go)
+SOURCES=$(wildcard *.go) $(wildcard cmd/*.go)
NAME=wx
-BINDIR=/usr/bin
+PREFIX?=/usr/local
+BINDIR=$(PREFIX)/bin
+MANDIR=$(PREFIX)/share/man
+
+.PHONY: all
+all: $(NAME) $(NAME).1
+
+$(NAME).1: doc/$(NAME).1.scd
+ scdoc < $< > $@
$(NAME): $(SOURCES)
go build -o $(NAME) .
@@ -8,7 +16,9 @@ $(NAME): $(SOURCES)
.PHONY: clean
clean:
rm -f $(NAME)
+ rm -f $(NAME).1
.PHONY: install
-install:
+install: $(NAME) $(NAME).1
install -m755 $(NAME) $(BINDIR)
+ install -m644 $(NAME).1 $(MANDIR)/man1
diff --git a/doc/wx.1.scd b/doc/wx.1.scd
new file mode 100644
index 0000000..1b452d8
--- /dev/null
+++ b/doc/wx.1.scd
@@ -0,0 +1,14 @@
+wx(1)
+
+# NAME
+
+wx - a front-end CLI for NOAA Aviation Weather Center data
+
+# SYNOPSIS
+
+wx _command_
+
+# COMMANDS
+
+*metar*
+ fetch METAR data