From edbedc000dfc1e51de2cb7e3d7d3e8113ab57411 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Tue, 15 Jan 2019 23:32:49 -0500 Subject: Add shell and unshell targets --- bin/cash/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bin/cash/Makefile') diff --git a/bin/cash/Makefile b/bin/cash/Makefile index 4a9ec599..5dd4e726 100644 --- a/bin/cash/Makefile +++ b/bin/cash/Makefile @@ -76,12 +76,19 @@ clean: rm -f cash $(OBJS) mknodes mksyntax $(GENSRCS) $(GENHDRS) tags .depend install: cash $(MAN1) - mkdir -p $(PREFIX)/bin $(MANDIR)/man1 + install -d $(PREFIX)/bin $(MANDIR)/man1 install cash $(PREFIX)/bin install -m 644 $(MAN1) $(MANDIR)/man1 uninstall: rm -f $(PREFIX)/bin/cash $(MAN1:%=$(MANDIR)/man1/%) +shell: + grep -q '^$(PREFIX)/bin/cash$$' /etc/shells \ + || echo '$(PREFIX)/bin/cash' >> /etc/shells + +unshell: + sed -i sed '\;^$(PREFIX)/bin/cash$$;d' /etc/shells + README: cash.7 mandoc cash.7 | col -bx > README -- cgit 1.4.1