Website/app/bin/make/help.sh
Snoweuph a6603432a5
Some checks failed
Quality Check / Check (push) Failing after 14s
#1 [Ticket] Improve Makefile
2024-02-19 22:23:38 +01:00

11 lines
No EOL
470 B
Bash
Executable file

#!/bin/bash
source bin/make/colors.sh
COLOR_HELP_GROUP=${COLOR_START}${COLOR_FG}${COLOR_BLUE}${COLOR_END}
COLOR_HELP_COMMAND=${COLOR_START}${COLOR_FG}${COLOR_GREEN}${COLOR_END}
COLOR_HELP_COMMAND_DESCRIPTION=${CLEAR}
grep -E '(^[a-zA-Z0-9_-]+:.*##.*$$)|(^##)' Makefile \
| awk "BEGIN {FS = \":.*?## \"}{printf \"${COLOR_MARKER}${COLOR_HELP_COMMAND}%-20s${COLOR_HELP_COMMAND_DESCRIPTION} %s\n\", \$1, \$2}" \
| sed -e "s/\\${COLOR_HELP_COMMAND}##/${COLOR_HELP_GROUP}/"