diff --git a/hack/tfw_magic_start.sh b/hack/tfw_magic_start.sh index 5949ae2..1131418 100755 --- a/hack/tfw_magic_start.sh +++ b/hack/tfw_magic_start.sh @@ -49,8 +49,26 @@ build_and_run_backend() run_backend } -trap 'exit' INT TERM -trap 'kill 0' EXIT -build_baseimage -run_frontend & build_and_run_backend -wait +start_tfw() +{ + trap 'exit' INT TERM + trap 'kill 0' EXIT + build_baseimage + run_frontend & build_and_run_backend + wait +} + +case $1 in + start) + start_tfw + ;; + build) + build_backend + ;; + buildtfw) + build_baseimage + ;; + *) + echo "Usage: tfw_magic_start.sh [start|build|buildtfw]" + ;; +esac