Skip to content

Instantly share code, notes, and snippets.

@timm
Last active March 28, 2024 00:26
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 timm/70c5abdc24888a60480efe55eb0b2e43 to your computer and use it in GitHub Desktop.
Save timm/70c5abdc24888a60480efe55eb0b2e43 to your computer and use it in GitHub Desktop.
Timm's gist-based tricks for scipting
#-- config begin -----------------------------------
DO_repos = ../ape ../tricks ../tests4mop
#--- config end ----------------------------------
SHELL := bash
MAKEFLAGS += --warn-undefined-variables
DO_cyan = \033[36m
DO_yellow = \033[93m
DO_white = \033[0m
define DO
$(foreach d,$(DO_repos), printf "$(DO_cyan):: $1 $d$(DO_white)\n"; cd $d; $(MAKE) $1;)
endef
.SILENT:
help : ## show help
awk 'BEGIN { FS = ":.*?## "; print "\nmake [WHAT]" } \
/^[^[:space:]].*##/ { printf " \033[36m%-10s\033[0m : %s\n", $$1, $$2} \
' $(MAKEFILE_LIST)
put: ## save this repos
@read -p "$$(PWD) commit msg> " x ;\
y=$${x:-saved} ; \
git commit -am "$$y" ; \
git push --quiet; git status ; \
echo "$$y: saved!"
pull: ## get updates from cloud
git pull --quiet
pulls: ## pull from cloud for this (and related) repos
$(call DO,pull)
puts: ## push to cloud for this (and related) repos
$(call DO,put)
And Fix Own
Are Fly Odd
Ape Fry Our
Ace For Pet
Act Got Pat
Ask Get Peg
Arm God Paw
Age Gel Pup
Ago Gas Pit
Air Hat Put
Ate Hit Pot
All Has Pop
But Had Pin
Bye How Rat
Bad Her Rag
Big His Rub
Bed Hen Row
Bat Ink Rug
Boy Ice Run
Bus Ill Rap
Bag Jab Ram
Box Jug Sow
Bit Jet See
Bee Jam Saw
Buy Jar Set
Bun Job Sit
Cub Jog Sir
Cat Kit Sat
Car Key Sob
Cut Lot Tap
Cow Lit Tip
Cry Let Top
Cab Lay Tug
Can Mat Tow
Dad Man Toe
Dab Mad Tan
Dam Mug Ten
Did Mix Two
Dug Map Use
Den Mum Van
Dot Mud Vet
Dip Mom Was
Day May Wet
Ear Met Win
Eye Net Won
Eat New Wig
End Nap War
Elf Now Why
Egg Nod Who
Far Net Way
Fat Not Wow
Few Nut You
Fan Oar Yes
Fun One Yak
Fit Out Yet
Fin Owl Zip
Fox Old Zap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment