| 1 | #!/usr/bin/env bash |
| 2 | # Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | # |
| 4 | # This source code is licensed under the MIT license found in the |
| 5 | # LICENSE file in the root directory of this source tree. |
| 6 | |
| 7 | set -eo pipefail |
| 8 | |
| 9 | if [[ "$REACT_CLASS_EQUIVALENCE_TEST" == "true" ]]; then |
| 10 | exit 0 |
| 11 | fi |
| 12 | |
| 13 | HERE=$(pwd) |
| 14 | |
| 15 | cd compiler/packages/babel-plugin-react-compiler |
| 16 | # Free the global link name first — it may be held by another React checkout, |
| 17 | # and `yarn link` (register) won't overwrite an existing owner. |
| 18 | yarn --silent unlink 2>/dev/null || true |
| 19 | yarn --silent link |
| 20 | cd "$HERE" |
| 21 | |
| 22 | yarn --silent link babel-plugin-react-compiler |