43 lines
882 B
Bash
Executable File
43 lines
882 B
Bash
Executable File
#!/bin/bash
|
|
DIR="$(dirname "$(readlink -f "$0")")"
|
|
SRC_ROOT=$DIR/../..
|
|
|
|
compiler="gcc"
|
|
build_type="debug"
|
|
case "$1" in
|
|
clang)
|
|
compiler="clang"
|
|
;;
|
|
release)
|
|
build_type="release"
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
build_path="$(../sparkd_path.sh build $compiler $build_type)"
|
|
BUILD_CMD="ninja -C $build_path"
|
|
|
|
BUILD_ROOT=`readlink -f $SRC_ROOT/build`
|
|
case "$1" in
|
|
debug)
|
|
BUILD_TYPE=ninja_debug
|
|
BUILD_ARG=debug
|
|
SPARK_ARGS="${@:2}"
|
|
;;
|
|
release)
|
|
BUILD_TYPE=ninja_release
|
|
BUILD_ARG=release
|
|
SPARK_ARGS="${@:2}"
|
|
;;
|
|
*)
|
|
BUILD_TYPE=ninja_debug
|
|
BUILD_ARG=debug
|
|
SPARK_ARGS="${@:1}"
|
|
echo
|
|
;;
|
|
esac
|
|
RUN_CMD="$DIR/run_spark_helper $BUILD_TYPE $SPARK_ARGS"
|
|
$DIR/build_spark $BUILD_ARG && $DIR/execute_in_docker $RUN_CMD
|
|
|
|
|