From 81a1d4594b6d14faf56a54332abcb7b7a6c0f8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Mih=C4=83il=C4=83?= Date: Thu, 13 Oct 2022 18:51:47 +0300 Subject: [PATCH] fix: some compatibility issues with non GNU environments refs #17 --- plugins.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins.mk b/plugins.mk index 33d4aca..9abedc4 100644 --- a/plugins.mk +++ b/plugins.mk @@ -46,12 +46,13 @@ endif cd elvis-$(ELVIS_VERSION) && \ $(ELVIS_REBAR3) escriptize $(gen_verbose) cp $(ELVIS_BUILD_DIR)/elvis-$(ELVIS_VERSION)/_build/default/bin/elvis $(ELVIS) - $(gen_verbose) cp --no-clobber $(ELVIS_BUILD_DIR)/elvis-$(ELVIS_VERSION)/elvis.config $(ELVIS_CONFIG) + $(gen_verbose) [ -e $(ELVIS_CONFIG) ] || \ + cp -n $(ELVIS_BUILD_DIR)/elvis-$(ELVIS_VERSION)/elvis.config $(ELVIS_CONFIG) $(verbose) chmod +x $(ELVIS) $(verbose) rm -rf $(ELVIS_BUILD_DIR)/elvis-$(ELVIS_VERSION) $(verbose) rm $(ELVIS_BUILD_DIR)/$(ELVIS_CODE_ARCHIVE) - $(verbose) rm --force $(ELVIS_BUILD_DIR)/rebar3 - $(verbose) rmdir --ignore-fail-on-non-empty $(ELVIS_BUILD_DIR) + $(verbose) rm -f $(ELVIS_BUILD_DIR)/rebar3 + $(verbose) [ -z "$(ls -A $(ELVIS_BUILD_DIR))" ] || rmdir $(ELVIS_BUILD_DIR) elvis: $(ELVIS) $(verbose) $(ELVIS) rock -c $(ELVIS_CONFIG) $(ELVIS_OPTS)