File tree 1 file changed +11
-7
lines changed 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,17 @@ TOOL_TPARSE_VERSION := v0.16.0
26
26
TOOL_TPARSE_PKG := github.com/mfridman/$(TOOL_TPARSE_NAME ) @$(TOOL_TPARSE_VERSION )
27
27
TOOL_TPARSE_BIN := ${TOOLS_FOLDER}/$(TOOL_TPARSE_NAME ) /$(TOOL_TPARSE_VERSION ) /$(TOOL_TPARSE_NAME )
28
28
29
- # Some colors
30
- COLOR_GREEN = $(shell tput -Txterm setaf 2)
31
- COLOR_YELLOW = $(shell tput -Txterm setaf 3)
32
- COLOR_WHITE = $(shell tput -Txterm setaf 7)
33
- COLOR_CYAN = $(shell tput -Txterm setaf 6)
34
- COLOR_RED = $(shell tput -Txterm setaf 1)
35
- COLOR_RESET = $(shell tput -Txterm sgr0)
29
+ # Some colors (if supported)
30
+ define get_color
31
+ $(shell tput -Txterm $(1 ) $(2 ) 2>/dev/null || echo "")
32
+ endef
33
+
34
+ COLOR_GREEN = $(call get_color,setaf,2)
35
+ COLOR_YELLOW = $(call get_color,setaf,3)
36
+ COLOR_WHITE = $(call get_color,setaf,7)
37
+ COLOR_CYAN = $(call get_color,setaf,6)
38
+ COLOR_RED = $(call get_color,setaf,1)
39
+ COLOR_RESET = $(call get_color,sgr0,)
36
40
37
41
# Blockchain constants
38
42
CHAIN := localnet
You can’t perform that action at this time.
0 commit comments