Hacker News new | past | comments | ask | show | jobs | submit login

> why not just do a bash script with a switch in it?

Because with bash scripts you'd be re-inventing the wheel when it comes to dependencies, among other things.

Make certainly might not be the right tool for having a bunch of "dev commands" that aren't targets/recipes, but bash isn't it either. There is plenty of task runners that allow you to have a single source of truth for dev commands.




Most "dependencies" in the makefiles I see which are like this are just other phony targets. In bash you can do this with functions, and if you're worried they'll get ran more than once you can write another 1 line function which only runs a function if it hasn't been ran yet during that execution of the script.

In fact, nothing is stopping people from using make for some things and leaving the bulk of everything else to a separate shell script.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: