summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f3d9d62..1a1bd94 100644
--- a/Makefile
+++ b/Makefile
@@ -59,8 +59,10 @@ install: build
mkdir -p $(CINST_ROOT)/supple
mkdir -p $(BINST_ROOT)
cp wrapper $(DESTDIR)$(WRAPPER_PATH)
- chown root:root $(DESTDIR)$(WRAPPER_PATH)
- chmod u+s $(DESTDIR)$(WRAPPER_PATH)
+ if [ "$$(whoami)" = "root" ]; then \
+ chown root:root $(DESTDIR)$(WRAPPER_PATH); \
+ chmod u+s $(DESTDIR)$(WRAPPER_PATH); \
+ fi
for MOD in $(sort $(LMOD_FILES)); do \
$(COPY_LMOD) lib/$${MOD} > $(LINST_ROOT)/$${MOD}; \
done