diff options
| -rw-r--r-- | Makefile | 25 | ||||
| -rw-r--r-- | README.md | 16 |
2 files changed, 29 insertions, 12 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2b9ff14 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +PREFIX = /usr +MANDIR = $(PREFIX)/share/man +BASHDIR = $(PREFIX)/share/bash-completion/completions +FISHDIR = $(PREFIX)/share/fish/vendor_completions.d + +.PHONY: default install + +default: aur.1 shell-completions/aur-completion.bash + +shell-completions/aur-completion.bash: + cd shell-completions && bash-completor -c aur.completor.bash + +aur.1: + help2man -n "A simple script for AUR package management" -N ./aur -o aur.1 + +install: shell-completions/aur-completion.bash aur.1 + @mkdir -p $(DESTDIR)$(PREFIX)/bin + @mkdir -p $(DESTDIR)$(MANDIR)/man1 + @mkdir -p $(DESTDIR)$(BASHDIR) + @mkdir -p $(DESTDIR)$(FISHDIR) + cp -p aur $(DESTDIR)$(PREFIX)/bin/aur + cp -p aur.1 $(DESTDIR)$(MANDIR)/man1 + cp -p shell-completions/aur-completion.bash $(DESTDIR)$(BASHDIR)/aur + cp -p shell-completions/aur.fish $(DESTDIR)$(FISHDIR)/aur.fish + chmod 755 $(DESTDIR)$(PREFIX)/bin/aur @@ -1,18 +1,10 @@ # aur -My AUR helper. See `aur -h` +A small AUR helper script. -## Shell completion - -Bash +## Installation ```sh -cp aur-completion.bash ~/.aur-completion.bash - -# add this line to your .bashrc -source ~/.aur-completion.bash +make install # may require sudo / root privileges ``` -Fish -```sh -cp aur.fish ~/.config/fish/completions/ -``` +This will install the `aur` binary, the `man` page and shell completions for fish and bash. |
