From 4d14156fd5b306b366b4d74e1a5bbf82e0ae081a Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sat, 23 Oct 2021 12:50:01 -0400 Subject: launch documentation by default --- Makefile | 7 +++++-- README.md | 8 +++++--- test/tests.sh | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d3346ed..2501da9 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,13 @@ SSHD_CONFIG_DIR = $(SSH_CONFIG_DIR)/sshd_config.d SSH_LIB_DIR = /usr/lib/ssh USER_SSH_CONFIG_DIR = ~$(USER)/.ssh +BROWSER != 2>/dev/null which xdg-open || which w3m || which links || which elinks + .PHONY: install shared doc test +doc: README.html + $(BROWSER) $< + shared: install git config core.self-forge true @@ -28,8 +33,6 @@ install: $(ROOT_INSTALL) -t "$(SSH_LIB_DIR)" $(SRC)/AuthorizedKeysCommand || true [ -e "$(SSH_LIB_DIR)"/AuthorizedKeysCommand ] || $(SUDO) ln -s -t /etc/ssh "$(SSH_LIB_DIR)"/AuthorizedKeysCommand -doc: README.html - README.html: README.md pandoc -t html $< > $@ diff --git a/README.md b/README.md index 015e545..b2935b8 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ HOW TO INSTALL Run: ``` - make + make install ``` This installs the `AnonymousAccessCommand` in the current user's home @@ -73,7 +73,8 @@ location: ``` make SSH_CONFIG_DIR=.config/ssh \ SSHD_CONFIG_DIR=.config/ssh/config.d \ - SSH_LIB_DIR=.local/lib/ssh + SSH_LIB_DIR=.local/lib/ssh \ + install ``` Then you will need to run `OpenSSH` on a non-default port (the default @@ -91,7 +92,8 @@ It is also possible to choose the location of the `AnonymousAccessCommand` itself: ``` - make USER_SSH_CONFIG_DIR=$HOME/.config/ssh + make USER_SSH_CONFIG_DIR=$HOME/.config/ssh \ + install ``` First you would have to make the contents of the installed file diff --git a/test/tests.sh b/test/tests.sh index 5d221b6..37f819f 100644 --- a/test/tests.sh +++ b/test/tests.sh @@ -45,7 +45,7 @@ export GIT_SSH_COMMAND="ssh -o NoHostAuthenticationForLocalhost=yes -i $SSH_ID" git clone -v ${USER}@${HOST}:${DIR} cd anonymous-ssh -make +make install git pull --ff-only make_test_commit -- cgit v1.2.3