You probably don't need make
2025-03-05
#!/bin/sh
do_task1() {
echo "hello form task1"
}
do_task2() {
echo "hello from task2"
}
if ! type do_"$1" >/dev/null 2>&1; then
echo "task '$1' does not exist" >&2
exit 1
fi
cmd=$1
shift
do_$cmd "$@"