ui.sh 927 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/sh -e
  2. #
  3. # Usage: ./ui.sh PORT [--gdb]
  4. #
  5. # OPTIONS:
  6. # --gdb run under gdb
  7. #
  8. SCRIPT_DIR="$(dirname $(readlink -f "$0"))"
  9. UDFS_DIR="${SCRIPT_DIR}/../../udfs;${SCRIPT_DIR}/../../essentials/udfs;${SCRIPT_DIR}/../../../contrib/ydb/library/yql/udfs"
  10. ASSETS_DIR=${SCRIPT_DIR}/http/www
  11. MOUNTS_CFG=${SCRIPT_DIR}/mounts.txt
  12. GATEWAYS_CFG=${SCRIPT_DIR}/../../essentials/cfg/tests/gateways.conf
  13. if [ -f "${SCRIPT_DIR}/../../pg_ext/postgis/libs/postgis/libpostgis.so" ]; then
  14. PG_EXT_OPT="--pg-ext pg_ext.txt"
  15. else
  16. PG_EXT_OPT=
  17. fi
  18. PORT=${1:-3000}
  19. if [ "$2" = "--gdb" ]; then
  20. GDB="ya tool gdb --args"
  21. fi
  22. if [ -z "${ARC_BUILD_DIR}" ]; then
  23. PGM=${SCRIPT_DIR}/yqlrun
  24. else
  25. PGM=${ARC_BUILD_DIR}/yql/tools/yqlrun/yqlrun
  26. fi
  27. ${GDB} ${PGM} ui \
  28. --mounts ${MOUNTS_CFG} \
  29. --udfs-dir ${UDFS_DIR} \
  30. --assets ${ASSETS_DIR} \
  31. --gateways-cfg ${GATEWAYS_CFG} \
  32. --remote --port $PORT \
  33. $PG_EXT_OPT