From 89395ba3f6ea5c91f93033962feff36e67c06efd Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sun, 24 Oct 2021 17:30:55 -0400 Subject: "make install" auto-selects user or root --- EndoForge/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EndoForge/Makefile b/EndoForge/Makefile index db8f77d..0f662d6 100644 --- a/EndoForge/Makefile +++ b/EndoForge/Makefile @@ -14,6 +14,8 @@ else SUDO = sudo endif +HAVE_ROOT != $(SUDO) true && echo y || true + ROOT_INSTALL = $(SUDO) $(INSTALL) USER != echo "$${SUDO_USER:-$$(id -un)}" SSH_CONFIG_DIR = /etc/ssh @@ -44,7 +46,7 @@ sed \ -e 's?PidFile=$$?&$(HOME)/.ssh/sshd.pid?' endef -install: install-user install-root +install: $(if $(HAVE_ROOT), install-root, install-user) install-user: $(INSTALL) -d ~/.ssh -- cgit v1.2.3