So, I have a Makefile which runs different commands of how to build S/W. I execute make
from within a MSYS / MinGW enviroment.
I found for example, the sleep <seconds>
command, but this only delays the execution. How can I make it wait for a key being pressed, for example?
You can use the read
command. When you are done you press enter and your script/makefile continues. It's a builtin bash command, so it should work also on MinGW.
My proposition doesn't stop execution but halts and resume display on capable terminals:
Use ctrl-S for halting display, and ctrl-Q for resuming.
You don't need to modify your Makefile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With