Run script with desired command as parameter. Repeat for as many parameters as you need.
./mockmaker git version
./mockmaker git --help
./mockmaker git thiswillfail
./mockmaker svn --version
Directory called "mocks" will be created, with executable file named after mocked command. This file can be run with given earlier parameters and output same stdout, stderr and exit code as original.
mocks/git
mocks/svn
- D0han
- brand0m