From f1dc49b43b6562504809c5799397d392c6426e31 Mon Sep 17 00:00:00 2001 From: ceb515 Date: Wed, 4 May 2022 14:18:49 -0400 Subject: [PATCH] Update makefile to check for root before install --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 00e5dd03..9f9e95a8 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,12 @@ clean: $(RM) -r dpkg_build tar_build $(RM) dvmhost_1.0.0* dvmhost-dbgsym*.deb -install: all +install: + @if ! [ "$(shell id -u)" = 0 ];then + @echo "You are not root, install will fail." + exit 1 + fi + all mkdir -p /opt/dvm/bin || true install -m 755 $(HOST_BIN) /opt/dvm/bin/ install -m 755 $(CMD_BIN) /opt/dvm/bin/