2021-04-28 19:12:09 +02:00
|
|
|
if [ "Windows_NT" = "$OS" ]; then
|
2024-02-01 19:38:14 +01:00
|
|
|
python='/cygdrive/c/python/python310/python.exe'
|
2024-02-15 22:08:05 +01:00
|
|
|
echo "Executing on windows, setting python to ${python}"
|
|
|
|
elif [ "$(uname)" = "Darwin" ]; then
|
|
|
|
python='/Library/Frameworks/Python.Framework/Versions/3.10/bin/python3'
|
|
|
|
echo "Executing on mac, setting python to ${python}"
|
2021-04-28 19:12:09 +02:00
|
|
|
else
|
2022-12-13 19:56:23 +01:00
|
|
|
if [ -f /opt/mongodbtoolchain/v4/bin/python3 ]; then
|
|
|
|
python="/opt/mongodbtoolchain/v4/bin/python3"
|
2024-02-15 22:08:05 +01:00
|
|
|
echo "Found python in v4 toolchain, setting python to ${python}"
|
2021-06-09 16:25:23 +02:00
|
|
|
elif [ -f "$(which python3)" ]; then
|
|
|
|
python=$(which python3)
|
2024-02-15 22:08:05 +01:00
|
|
|
echo "Could not find mongodbtoolchain python, using system python ${python}"
|
2021-06-09 16:25:23 +02:00
|
|
|
else
|
2024-02-15 22:08:05 +01:00
|
|
|
echo "Could not find python3."
|
2021-06-09 16:25:23 +02:00
|
|
|
return 1
|
|
|
|
fi
|
2021-04-28 19:12:09 +02:00
|
|
|
fi
|