Run

Some time in high school I wrote a shell script called Run. The idea was for it to be a quick alternative to make for ad hoc programs. Namely, run prog.ext would compile and run prog.ext regardless of what language prog.ext was written in. Of course, rules would have to be written for each supported language. Language was inferred by file extension. For compiled languages, caching was possible, so run test.cpp would not compile test.cpp if had already been compiled before, for example.

This project was a fun idea, and it was very useful for things like programming contests, but there are a lot of shortcomings. run is written entirely in Bash, so there are probably bugs I’m not aware of, and the rule files have very limited semantics. It would’ve been a better idea just to learn make and leverage make’s implicit rules rather than reinvent a worse version of the wheel.


18 October 2022