Merge pull request #270 from s-bauer/patch-3

Updated warnroot and checkroot Commands
This commit is contained in:
Olof Hagsand 2021-09-30 16:25:21 +02:00 committed by GitHub
commit 820e2f0837
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,12 +66,18 @@ all: $(SUBDIRS2) warnroot
@echo "\e[32mAfter 'make install' as euid root, build example app and test utils: 'make example'\e[0m"
checkroot:
@if [ "$${DESTDIR}" = "" -a $$(id -u) != "0" ]; \
then echo "\e[31mThis target must be made as euid root\e[0m"; exit 1; fi;
@if command -v id &> /dev/null; then \
if [ "$${DESTDIR}" = "" -a $$(id -u) != "0" ]; then \
echo "\e[31mThis target must be made as euid root\e[0m"; exit 1; \
fi; \
fi;
warnroot:
@if [ $$(id -u) = 0 ]; \
then echo "\e[36mWarning: You built this target as uid root\e[0m"; exit 0; fi;
@if command -v id &> /dev/null; then \
if [ $$(id -u) = 0 ]; then \
echo "\e[36mWarning: You built this target as uid root\e[0m"; exit 0; \
fi; \
fi;
checkinstall:
@if [ ! -f $(prefix)/include/clixon/clixon.h ]; then \