hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/docker-entrypoint.sh
blob: 1344e85d522583510df03d5cbcf2ea906c87fac8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
set -eu

if [ "$#" -eq 0 ]; then
    set -- list
fi

target="$1"
shift

case "$target" in
    day[0-9]*)
        target="run-$target"
        ;;
    build-day[0-9]*)
        target="${target#build-}"
        ;;
    run-day[0-9]*)
        ;;
    *)
        # allow raw make targets
        ;;
esac

exec make "$target" "$@"