build: fix build scripts on macOS (#33843)

In #33823, `scripts/package-builds.sh` (which is used by both
`build-packages-dist.sh` and `build-ivy-npm-packages.sh`) was updated to
use `realpath`. It turns out that `realpath` does not exist on macOS, so
the build scripts do not work there.

This commit fixes it by switching from `realpath $(pwd)/..` to
`dirname $(pwd)`, which does practically the same thing (in this
situation) and works on macOS as well.

PR Close #33843
This commit is contained in:
George Kalpakas 2019-11-15 02:56:55 +02:00 committed by Alex Rickabaugh
parent ffe57a004c
commit 695bb6ca87
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ set -u -e -o pipefail
cd "$(dirname "$0")"
# basedir is the workspace root
readonly base_dir="$(realpath "$(pwd)/..")"
readonly base_dir="$(dirname "$(pwd)")"
readonly bazel_bin="$(yarn run -s bazel info bazel-bin)"
readonly script_path="$0"