diff options
author | Andrew Cady <d@cryptonomic.net> | 2021-10-23 12:52:42 -0400 |
---|---|---|
committer | Andrew Cady <d@cryptonomic.net> | 2021-10-23 12:52:42 -0400 |
commit | 2e5909e761f40e42684fbaa71f3b5bcb49500567 (patch) | |
tree | 335259ca973c5e07807fcb97fb09a1f49fb2a1dc /Makefile | |
parent | 4d14156fd5b306b366b4d74e1a5bbf82e0ae081a (diff) |
move all files to EndoForge
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/Makefile b/Makefile deleted file mode 100644 index 2501da9..0000000 --- a/Makefile +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | ifeq ($(shell id -u),0) | ||
2 | SUDO = | ||
3 | else | ||
4 | SUDO = sudo | ||
5 | endif | ||
6 | |||
7 | ROOT_INSTALL = $(SUDO) install | ||
8 | |||
9 | USER != echo "$${SUDO_USER:-$$(id -un)}" | ||
10 | |||
11 | SSH_CONFIG_DIR = /etc/ssh | ||
12 | SSHD_CONFIG_DIR = $(SSH_CONFIG_DIR)/sshd_config.d | ||
13 | SSH_LIB_DIR = /usr/lib/ssh | ||
14 | USER_SSH_CONFIG_DIR = ~$(USER)/.ssh | ||
15 | |||
16 | BROWSER != 2>/dev/null which xdg-open || which w3m || which links || which elinks | ||
17 | |||
18 | .PHONY: install shared doc test | ||
19 | |||
20 | doc: README.html | ||
21 | $(BROWSER) $< | ||
22 | |||
23 | shared: install | ||
24 | git config core.self-forge true | ||
25 | |||
26 | SRC = src | ||
27 | SOURCES = $(addprefix $(SRC), AnonymousAccessCommand anonymous-access.conf AuthorizedKeysCommand) | ||
28 | |||
29 | install: | ||
30 | install -t $(USER_SSH_CONFIG_DIR) $(SRC)/AnonymousAccessCommand | ||
31 | $(ROOT_INSTALL) -d "$(SSH_CONFIG_DIR)" "$(SSHD_CONFIG_DIR)" "$(SSH_LIB_DIR)" || true | ||
32 | $(ROOT_INSTALL) -m0644 -t "$(SSHD_CONFIG_DIR)" $(SRC)/anonymous-access.conf || true | ||
33 | $(ROOT_INSTALL) -t "$(SSH_LIB_DIR)" $(SRC)/AuthorizedKeysCommand || true | ||
34 | [ -e "$(SSH_LIB_DIR)"/AuthorizedKeysCommand ] || $(SUDO) ln -s -t /etc/ssh "$(SSH_LIB_DIR)"/AuthorizedKeysCommand | ||
35 | |||
36 | README.html: README.md | ||
37 | pandoc -t html $< > $@ | ||
38 | |||
39 | test: | ||
40 | make -C test | ||