mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
add script to put node/yarn on path
This commit is contained in:
parent
47b701688f
commit
195361ed46
1 changed files with 24 additions and 0 deletions
24
scripts/node-env
Executable file
24
scripts/node-env
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/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
|
Loading…
Reference in a new issue