Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion packages/react-native-codegen/scripts/oss/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ else
fi
YARN_BINARY="${YARN_BINARY:-$YARN_OR_NPM}"

# mv command to use when copying files into the working directory
EDEN_SAFE_MV="mv"

if [ -x "$(command -v eden)" ]; then
pushd "$THIS_DIR"

# Detect if we are in an EdenFS checkout
if [[ "$OSTYPE" == "darwin"* ]] && eden info; then
EDEN_SAFE_MV="cp -R -X"
fi

popd >/dev/null
fi

if [[ ${FBSOURCE_ENV:-0} -eq 1 ]]; then
# Custom FB-specific setup
pushd "$CODEGEN_DIR" >/dev/null
Expand Down Expand Up @@ -56,6 +70,7 @@ else

popd >/dev/null

mv "$TMP_DIR/lib" "$TMP_DIR/node_modules" "$CODEGEN_DIR"
$EDEN_SAFE_MV "$TMP_DIR/lib" "$CODEGEN_DIR"
$EDEN_SAFE_MV "$TMP_DIR/node_modules" "$CODEGEN_DIR"
rm -rf "$TMP_DIR"
fi