Skip to content

Instantly share code, notes, and snippets.

@kborovik
Last active May 4, 2024 17:47
Show Gist options
  • Save kborovik/d300931d7813bed6d1a977654f83ce83 to your computer and use it in GitHub Desktop.
Save kborovik/d300931d7813bed6d1a977654f83ce83 to your computer and use it in GitHub Desktop.
make - color messages
###############################################################################
# Color Messages
###############################################################################
black := \e[30m
red := \e[31m
green := \e[32m
yellow := \e[33m
blue := \e[34m
magenta := \e[35m
cyan := \e[36m
white := \e[37m
reset := \e[0m
define header
echo "$(green)==> $(1) <==$(reset)"
endef
define help
echo "$(blue)$(1)$(reset) - $(white)$(2)$(reset)"
endef
define var
echo "$(magenta)$(1)$(reset): $(yellow)$(2)$(reset)"
endef
###############################################################################
# Examples
###############################################################################
settings:
$(call header,Settings)
$(call var,google_project,$(google_project))
help:
$(call header,Help)
$(call help,make terraform,Run Terraform plan and apply)
$(call help,make dns-status,Show DNS status)
$(call help,make vpn-status,Show VPN status)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment