From 46800f0671f1ea796e9aab3461d04f90e4811592 Mon Sep 17 00:00:00 2001 From: Sergey Prokhorov Date: Wed, 28 Aug 2019 23:46:17 +0200 Subject: [PATCH] Minor makefile fixes * fix epmd detection on CentOS * get rid of awk dependency --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e10ec74..15d1d0e 100644 --- a/Makefile +++ b/Makefile @@ -43,14 +43,14 @@ install: user $(LOGDIR) chmod 777 $(prefix)/mtp_proxy/log/ install -D config/mtproto-proxy.service $(SERVICE) # If there is no "epmd" service, install one - if [ -z "`systemctl show -p FragmentPath --value epmd`" ]; then \ + if [ -z "`systemctl show -p FragmentPath epmd | cut -d = -f 2`" ]; then \ install -D config/epmd.service $(EPMD_SERVICE); \ fi systemctl daemon-reload .PHONY: update-sysconfig update-sysconfig: config/prod-sys.config $(prefix)/mtp_proxy - REL_VSN=$(shell awk '{print $$2}' $(prefix)/mtp_proxy/releases/start_erl.data) && \ + REL_VSN=$(shell cut -d " " -f 2 $(prefix)/mtp_proxy/releases/start_erl.data) && \ install -m 644 config/prod-sys.config "$(prefix)/mtp_proxy/releases/$${REL_VSN}/sys.config" uninstall: