diff options
| author | Louis Burda <dev@sinitax.com> | 2026-01-23 02:19:21 +0100 |
|---|---|---|
| committer | Louis Burda <dev@sinitax.com> | 2026-01-23 02:19:21 +0100 |
| commit | 4779981ac8af91788106d8c98f1148bf0d24c582 (patch) | |
| tree | 529fdb03686c36ab27e8345b974de7d5becdd9ca | |
| parent | a16ade437116642ddcc05c02ddb4db64d8b514bd (diff) | |
| download | jgrep-main.tar.gz jgrep-main.zip | |
| -rw-r--r-- | Makefile | 15 | ||||
| -rw-r--r-- | README.md | 13 |
2 files changed, 22 insertions, 6 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..25ade59 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin +MANDIR ?= $(PREFIX)/share/man/man1 + +.PHONY: install uninstall + +install: + install -d "$(DESTDIR)$(BINDIR)" + install -m 755 jgrep "$(DESTDIR)$(BINDIR)/jgrep" + install -d "$(DESTDIR)$(MANDIR)" + install -m 644 jgrep.1 "$(DESTDIR)$(MANDIR)/jgrep.1" + +uninstall: + rm -f "$(DESTDIR)$(BINDIR)/jgrep" + rm -f "$(DESTDIR)$(MANDIR)/jgrep.1" @@ -5,13 +5,14 @@ A grep-like tool for searching JSON files by matching values against patterns. ## Installation ```bash -# Copy to a directory in your PATH -sudo cp jgrep /usr/local/bin/ -sudo cp jgrep.1 /usr/local/share/man/man1/ +# Install system-wide +sudo make install -# Or use locally -chmod +x jgrep -./jgrep --help +# Or specify prefix +make install PREFIX=~/.local + +# Uninstall +sudo make uninstall ``` ## Usage |
