Makefile: Improve the shell script of `commands`
Merge pull request #662 from sjackman/patch-1

Makefile: Improve the shell script of `commands`