Skip to content

Instantly share code, notes, and snippets.

@crissilvaeng
Created July 18, 2023 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crissilvaeng/3f17e722a8aa3d41ef6bcbd4751653fa to your computer and use it in GitHub Desktop.
Save crissilvaeng/3f17e722a8aa3d41ef6bcbd4751653fa to your computer and use it in GitHub Desktop.
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