From d4a2058895062d7cf2858056612fed50f672705f Mon Sep 17 00:00:00 2001 From: Steve Shreeve Date: Thu, 17 Nov 2022 14:22:19 -0700 Subject: [PATCH 1/2] Allow react-native and expo to build when using GNU coreutils See the issue at https://github.com/facebook/react-native/issues/32432#issuecomment-1242234121 This fixes a bizarre issue when using the GNU coreutils tools. There are very minor changes in the standard command-line tools on macOS and the GNU coreutils. The `cp` command has slightly different semantics across these operating systems, so this commit normalizes those differences and allows GNU coreutils to be used or the system native version of `cp`. --- scripts/react_native_pods_utils/script_phases.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/react_native_pods_utils/script_phases.sh b/scripts/react_native_pods_utils/script_phases.sh index a46dc8ab17fba8..2319ada15d2406 100755 --- a/scripts/react_native_pods_utils/script_phases.sh +++ b/scripts/react_native_pods_utils/script_phases.sh @@ -104,7 +104,7 @@ moveOutputs () { mkdir -p "$RCT_SCRIPT_OUTPUT_DIR" # Copy all output to output_dir - cp -R "$TEMP_OUTPUT_DIR/" "$RCT_SCRIPT_OUTPUT_DIR" || exit 1 + cp -R "$TEMP_OUTPUT_DIR/." "$RCT_SCRIPT_OUTPUT_DIR/." || exit 1 echo "$LIBRARY_NAME output has been written to $RCT_SCRIPT_OUTPUT_DIR:" >> "${SCRIPT_OUTPUT_FILE_0}" 2>&1 ls -1 "$RCT_SCRIPT_OUTPUT_DIR" >> "${SCRIPT_OUTPUT_FILE_0}" 2>&1 } From d240dbc15c5c24553e53ffff280947df39bc3138 Mon Sep 17 00:00:00 2001 From: Steve Shreeve Date: Wed, 23 Nov 2022 14:07:08 -0700 Subject: [PATCH 2/2] Small cleanup --- scripts/react_native_pods_utils/script_phases.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/react_native_pods_utils/script_phases.sh b/scripts/react_native_pods_utils/script_phases.sh index 2319ada15d2406..08efd2afbde022 100755 --- a/scripts/react_native_pods_utils/script_phases.sh +++ b/scripts/react_native_pods_utils/script_phases.sh @@ -104,7 +104,7 @@ moveOutputs () { mkdir -p "$RCT_SCRIPT_OUTPUT_DIR" # Copy all output to output_dir - cp -R "$TEMP_OUTPUT_DIR/." "$RCT_SCRIPT_OUTPUT_DIR/." || exit 1 + cp -R "$TEMP_OUTPUT_DIR/." "$RCT_SCRIPT_OUTPUT_DIR" || exit 1 echo "$LIBRARY_NAME output has been written to $RCT_SCRIPT_OUTPUT_DIR:" >> "${SCRIPT_OUTPUT_FILE_0}" 2>&1 ls -1 "$RCT_SCRIPT_OUTPUT_DIR" >> "${SCRIPT_OUTPUT_FILE_0}" 2>&1 }