mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
24 lines
705 B
Bash
Executable file
24 lines
705 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Put our vendored version of node/yarn on the path. Can be helpful if you need
|
|
# quick access on a machine that does not have Node installed separately.
|
|
|
|
# Eg:
|
|
# $ . scripts/node-env
|
|
# $ (cd ts && yarn)
|
|
|
|
BAZEL_EXTERNAL=$(bazel info output_base --ui_event_filters=-INFO)/external
|
|
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
if [ "$(arch)" == "i386" ]; then
|
|
export PATH="$BAZEL_EXTERNAL/nodejs_darwin_amd64/bin:$PATH"
|
|
else
|
|
export PATH="$BAZEL_EXTERNAL/nodejs_darwin_arm64/bin:$PATH"
|
|
fi
|
|
else
|
|
if [ "$(arch)" == "aarch64" ]; then
|
|
export PATH="$BAZEL_EXTERNAL/nodejs_linux_arm64/bin:$PATH"
|
|
else
|
|
export PATH="$BAZEL_EXTERNAL/nodejs_linux_amd64/bin:$PATH"
|
|
fi
|
|
fi
|