diff --git a/packages/react-native-codegen/scripts/oss/build.sh b/packages/react-native-codegen/scripts/oss/build.sh index fc9895851f44a8..5822ffb7cf3b06 100755 --- a/packages/react-native-codegen/scripts/oss/build.sh +++ b/packages/react-native-codegen/scripts/oss/build.sh @@ -6,7 +6,7 @@ # This script assumes yarn is already installed. -THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) set -e set -u diff --git a/packages/react-native-codegen/src/cli/combine/combine_js_to_schema.sh b/packages/react-native-codegen/src/cli/combine/combine_js_to_schema.sh index ed6931a38cff12..3d4718d538820e 100755 --- a/packages/react-native-codegen/src/cli/combine/combine_js_to_schema.sh +++ b/packages/react-native-codegen/src/cli/combine/combine_js_to_schema.sh @@ -7,7 +7,7 @@ set -e set -u -THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) # shellcheck source=xplat/js/env-utils/setup_env_vars.sh source "$THIS_DIR/../../../../../../env-utils/setup_env_vars.sh" diff --git a/packages/react-native-codegen/src/cli/generators/generate-all.sh b/packages/react-native-codegen/src/cli/generators/generate-all.sh index 45c7db81dcaa64..cf5e3f9276f044 100755 --- a/packages/react-native-codegen/src/cli/generators/generate-all.sh +++ b/packages/react-native-codegen/src/cli/generators/generate-all.sh @@ -7,7 +7,7 @@ set -e set -u -THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) # shellcheck source=xplat/js/env-utils/setup_env_vars.sh source "$THIS_DIR/../../../../../../env-utils/setup_env_vars.sh" diff --git a/packages/react-native-codegen/src/cli/parser/parser.sh b/packages/react-native-codegen/src/cli/parser/parser.sh index 56b708fe89ea49..8d130f250017be 100755 --- a/packages/react-native-codegen/src/cli/parser/parser.sh +++ b/packages/react-native-codegen/src/cli/parser/parser.sh @@ -7,7 +7,7 @@ set -e set -u -THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) # shellcheck source=xplat/js/env-utils/setup_env_vars.sh source "$THIS_DIR/../../../../../../env-utils/setup_env_vars.sh" diff --git a/runXcodeTests.sh b/runXcodeTests.sh index c071a4c0548c76..17f82932ef0582 100755 --- a/runXcodeTests.sh +++ b/runXcodeTests.sh @@ -6,7 +6,7 @@ # This script should be run from the react-native root -THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) source "scripts/.tests.env" if [ -n "$1" ] diff --git a/scripts/objc-test.sh b/scripts/objc-test.sh index b5ace1afa869ef..d2d6ecaa0075cc 100755 --- a/scripts/objc-test.sh +++ b/scripts/objc-test.sh @@ -78,7 +78,7 @@ xcprettyFormat() { # Circle CI expects JUnit reports to be available here REPORTS_DIR="$HOME/react-native/reports/junit" else - THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) + THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) # Write reports to the react-native root dir REPORTS_DIR="$THIS_DIR/../build/reports" diff --git a/scripts/packager.sh b/scripts/packager.sh index acb1581257863f..b9f90160f1aec8 100755 --- a/scripts/packager.sh +++ b/scripts/packager.sh @@ -5,7 +5,7 @@ # LICENSE file in the root directory of this source tree. # scripts directory -THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) REACT_NATIVE_ROOT="$THIS_DIR/.." # Application root directory - General use case: react-native is a dependency PROJECT_ROOT="$THIS_DIR/../../.." diff --git a/scripts/run-android-emulator.sh b/scripts/run-android-emulator.sh index 99c5b6444923a1..2f246b4af5a8d3 100755 --- a/scripts/run-android-emulator.sh +++ b/scripts/run-android-emulator.sh @@ -10,7 +10,7 @@ # virtual device configuration. # This is useful for running integration tests on a local machine. -THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) STATE=`adb get-state` diff --git a/scripts/update_podfile_lock.sh b/scripts/update_podfile_lock.sh index 87b559264b1be1..fa6db464666ebb 100755 --- a/scripts/update_podfile_lock.sh +++ b/scripts/update_podfile_lock.sh @@ -8,7 +8,7 @@ # Usage: # source scripts/update_podfile_lock && update_pods -THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) RNTESTER_DIR="$THIS_DIR/../packages/rn-tester" # Keep this separate for FB internal access.