cargo-install-all.sh: on Mac OS X, use greadlink instead of readlink (#16642)
* on Mac OS X, use greadlink when building from source * this is a cleaner way to do it * we want to keep the cargo install comment at the top of the script
This commit is contained in:
parent
f5f06904c3
commit
0b84440e0f
|
@ -3,7 +3,13 @@
|
||||||
# |cargo install| of the top-level crate will not install binaries for
|
# |cargo install| of the top-level crate will not install binaries for
|
||||||
# other workspace crates or native program crates.
|
# other workspace crates or native program crates.
|
||||||
here="$(dirname "$0")"
|
here="$(dirname "$0")"
|
||||||
cargo="$(readlink -f "${here}/../cargo")"
|
readlink_cmd="readlink"
|
||||||
|
if [[ $OSTYPE == darwin* ]]; then
|
||||||
|
# Mac OS X's version of `readlink` does not support the -f option,
|
||||||
|
# But `greadlink` does, which you can get with `brew install coreutils`
|
||||||
|
readlink_cmd="greadlink"
|
||||||
|
fi
|
||||||
|
cargo="$("${readlink_cmd}" -f "${here}/../cargo")"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue