In any case, I digress, back to real work. I use Makefiles as a general purpose tool to launch any of a number of shell scripts which I use to maintain my code, and instead of actually having external shell scripts, I just build any necessary bash right into the Makefile.
One benefit of all this is that when you type “Make <target>”, the <target> can actually autocomplete which makes your shell experience that much more friendly.
rsync -avz --include=*$(EXT) --exclude='*' --delete dist/ $(WWW) # empty the file echo -n '' > $(METADATA) cd $(WWW); for i in *$(EXT); do b=$$(basename $$i $(EXT)); V=$$(echo -n $$(basename "`echo -n "$$b" | rev`" "`echo -n "$(NAME)-" | rev`") | rev); echo $(NAME) $$V $$i >> $(METADATA); done; sort -V -k 2 -o $(METADATA) $(METADATA) # sort by version key
The full Makefile can be found inside of the bash-tutor tarball.