4 ms·
make still has a better UI than shell scripts. With shell scripts you have to maintain multiple files whereas a Makefile has all the scripts in a single file.
by xmprt 2y ago
make still has a better UI than shell scripts. With shell scripts you have to maintain multiple files whereas a Makefile has all the scripts in a single file.
- t3rra 2y agowth. makefile can include other makefiles.
- edflsafoiewq 2y agoWhy is that a better UI?
- SahAssar 2y agoNo you don't. I like makefiles because of the dependencies between targets but for simple multi-target things I still do shell scripts like mything() { # ... } otherthing() { # ... } if [ $# -eq 0 ]; then echo "Usage: ./run.sh [mything, otherthing]" exit 1 fi "$@"
- collinvandyck76 2y agoI've been writing scripts like this but with a case/esac at the bottom to map $1 to the right command. Have never thought about doing this instead. thank you for opening my eyes!
- banish-m4 2y agoBeen There, Done That, Bought The T-Shirt and leads to unmaintainable shit. One script per action. The end.
- collinvandyck76 2y agoMaybe for your usecase, sure, but my usecase is my own dotfiles which has some of these helper scripts and it's a good fit there.
- SahAssar 2y agoYou express no nuance and only say that something is wrong without explaining why. Your communication skills lack "skill" and "communication". Your absolutism makes me convinced that you are are either wrong or incapable to explain why you would be right.
- banish-m4 2y agoThat's a god function antipattern and rapidly becomes non-portable. Each lifecycle hook should be a an executable of some sort like "scripts/{{command}}", be it a shell script or something else.