File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,35 @@ if [ -z "${WAR_RPC+x}" ]; then
88 exit 1
99fi
1010
11+ # Colors and styles
12+ RESET=' \033[0m'
13+ BOLD=' \033[1m'
14+
15+ # Use colors if we can and have the color space
16+ if command -v tput & > /dev/null; then
17+ ncolors=$( tput colors)
18+ if [ -n " $ncolors " ] && [ " $ncolors " -ge 8 ]; then
19+ RESET=$( tput sgr0)
20+ BOLD=$( tput bold)
21+ fi
22+ fi
23+
24+ print_message () {
25+ local color=" $1 "
26+ local message=" $2 "
27+ local format=" ${3:- } "
28+ echo -e " ${format}${color}${message}${RESET} "
29+ }
30+
31+ print_partial_message () {
32+ local pre_message=" $1 "
33+ local formatted_part=" $2 "
34+ local post_message=" $3 "
35+ local format=" ${4:- } " # Default to empty string if not provided
36+ local color=" ${5:- $RESET } "
37+
38+ echo -e " ${color}${pre_message}${format}${formatted_part}${RESET}${color}${post_message}${RESET} "
39+ }
1140# Check minikube status
1241minikube delete
1342
You can’t perform that action at this time.
0 commit comments