diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..54c30c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +./knit diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a96230d --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +BINARY_NAME=knit + +PREFIX ?= /usr/local +BINDIR = $(PREFIX)/bin + +.PHONY: all build install clean + +all: build + +build: + go build -o $(BINARY_NAME) ./cmd/knit + +install: build + mkdir -p $(BINDIR) + cp $(BINARY_NAME) $(BINDIR)/$(BINARY_NAME) + +clean: + rm -f $(BINARY_NAME) diff --git a/README.md b/README.md index ebe65ad..b30e61d 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,18 @@ A CLI for tangled.sh ## Installation +Using go: + `go install tangled.sh/rockorager.dev/knit` +Otherwise, + +``` +git clone https://tangled.sh/rockorager.dev/knit +cd knit +make install +``` + ## Usage `knit` has similar usage patterns as the Github CLI (`gh`). Prior to making any