5 ms·
No 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() {
by SahAssar 2y ago
No 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.