stop relying on python being in the PATH

This commit is contained in:
Ralf Jung 2022-05-10 12:14:47 +02:00
parent 36c274aa38
commit 82411c5840

2
miri
View File

@ -40,7 +40,7 @@ TARGET=$(rustc --version --verbose | grep "^host:" | cut -d ' ' -f 2)
SYSROOT=$(rustc --print sysroot) SYSROOT=$(rustc --print sysroot)
LIBDIR=$SYSROOT/lib/rustlib/$TARGET/lib LIBDIR=$SYSROOT/lib/rustlib/$TARGET/lib
# macOS does not have a useful readlink/realpath so we have to use Python instead... # macOS does not have a useful readlink/realpath so we have to use Python instead...
MIRIDIR=$(dirname "$(python -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$0")") MIRIDIR=$(dirname "$(python3 -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$0")")
if ! test -d "$LIBDIR"; then if ! test -d "$LIBDIR"; then
echo "Something went wrong determining the library dir." echo "Something went wrong determining the library dir."
echo "I got $LIBDIR but that does not exist." echo "I got $LIBDIR but that does not exist."