diff options
Diffstat (limited to 'EndoForge')
-rw-r--r-- | EndoForge/Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/EndoForge/Makefile b/EndoForge/Makefile index db8f77d..0f662d6 100644 --- a/EndoForge/Makefile +++ b/EndoForge/Makefile | |||
@@ -14,6 +14,8 @@ else | |||
14 | SUDO = sudo | 14 | SUDO = sudo |
15 | endif | 15 | endif |
16 | 16 | ||
17 | HAVE_ROOT != $(SUDO) true && echo y || true | ||
18 | |||
17 | ROOT_INSTALL = $(SUDO) $(INSTALL) | 19 | ROOT_INSTALL = $(SUDO) $(INSTALL) |
18 | USER != echo "$${SUDO_USER:-$$(id -un)}" | 20 | USER != echo "$${SUDO_USER:-$$(id -un)}" |
19 | SSH_CONFIG_DIR = /etc/ssh | 21 | SSH_CONFIG_DIR = /etc/ssh |
@@ -44,7 +46,7 @@ sed \ | |||
44 | -e 's?PidFile=$$?&$(HOME)/.ssh/sshd.pid?' | 46 | -e 's?PidFile=$$?&$(HOME)/.ssh/sshd.pid?' |
45 | endef | 47 | endef |
46 | 48 | ||
47 | install: install-user install-root | 49 | install: $(if $(HAVE_ROOT), install-root, install-user) |
48 | 50 | ||
49 | install-user: | 51 | install-user: |
50 | $(INSTALL) -d ~/.ssh | 52 | $(INSTALL) -d ~/.ssh |