blob: c8ee295a797a0e4ba16c24734e6ce0b78c1050f0 (
plain) (
blame)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/sh -e
#
# Usage: ./ui.sh PORT [--gdb]
#
# OPTIONS:
# --gdb run under gdb
#
SCRIPT_DIR="$(dirname $(readlink -f "$0"))"
UDFS_DIR="${SCRIPT_DIR}/../../udfs;${SCRIPT_DIR}/../../essentials/udfs;${SCRIPT_DIR}/../../../contrib/ydb/library/yql/udfs"
ASSETS_DIR=${SCRIPT_DIR}/http/www
MOUNTS_CFG=${SCRIPT_DIR}/mounts.txt
GATEWAYS_CFG=${SCRIPT_DIR}/../../essentials/cfg/tests/gateways.conf
if [ -f "${SCRIPT_DIR}/../../pg_ext/postgis/libs/postgis/libpostgis.so" ]; then
PG_EXT_OPT="--pg-ext pg_ext.txt"
else
PG_EXT_OPT=
fi
PORT=${1:-3000}
if [ "$2" = "--gdb" ]; then
GDB="ya tool gdb --args"
fi
if [ -z "${ARC_BUILD_DIR}" ]; then
PGM=${SCRIPT_DIR}/yqlrun
else
PGM=${ARC_BUILD_DIR}/yql/tools/yqlrun/yqlrun
fi
${GDB} ${PGM} ui \
--mounts ${MOUNTS_CFG} \
--udfs-dir ${UDFS_DIR} \
--assets ${ASSETS_DIR} \
--gateways-cfg ${GATEWAYS_CFG} \
--remote --port $PORT \
$PG_EXT_OPT
|