sourcegraph/dev/scip-treesitter-dev
Varun Gandhi 21dbf38906
build: Use scip-treesitter binary consistently (#59891)
Use the same environment variable name everywhere, and make sure
we use the new binary name for tests.
2024-01-26 16:58:11 +08:00

18 lines
586 B
Bash
Executable File

#!/usr/bin/env bash
# Wrapper for `scip-treesitter` similar to `dev/scip-ctags-dev`.
#
# To use an alternate scip-treesitter binary for development, invoke
# `SCIP_TREESITTER_PATH=path/to/scip-treesitter sg start`.
root="$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
TARGET=$("$root/dev/scip-treesitter-install.sh" which)
if [ ! -f "${TARGET}" ]; then
echo "scip-treesitter is not installed, please run ./dev/scip-treesitter-install.sh"
echo "Alternatively you can use SCIP_TREESITTER_PATH=path/to/scip-treesitter to use your own binary."
exit 1
else
${TARGET} "$@"
fi