Created
July 18, 2023 15:27
-
-
Save crissilvaeng/3f17e722a8aa3d41ef6bcbd4751653fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCRIPTS := scripts/cmd | |
CMD := $(sort $(basename $(notdir $(wildcard $(SCRIPTS)/*.sh)))) | |
.DEFAULT_GOAL := help | |
.PHONY: help $(CMD) scripts | |
SHELL := /bin/bash | |
.ONESHELL: | |
.EXPORT_ALL_VARIABLES: | |
GOPRIVATE := github.com/crissilvaeng/* | |
scripts: | |
@chmod -R +x $(SCRIPTS) | |
help: scripts | |
@echo "usage: make <command>" | |
@echo "commands:" | |
@for cmd in $(CMD); do \ | |
./$(SCRIPTS)/$$cmd.sh --help; \ | |
done | |
@echo " help - list available commands" | |
$(CMD): scripts | |
@./$(SCRIPTS)/$@.sh $(mod) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment