2021-04-28 13:12:09 -04:00
|
|
|
if [ "Windows_NT" = "$OS" ]; then
|
2024-02-01 10:38:14 -08:00
|
|
|
python='/cygdrive/c/python/python310/python.exe'
|
2024-02-15 13:08:05 -08: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 13:12:09 -04:00
|
|
|
else
|
2022-12-13 13:56:23 -05:00
|
|
|
if [ -f /opt/mongodbtoolchain/v4/bin/python3 ]; then
|
|
|
|
|
python="/opt/mongodbtoolchain/v4/bin/python3"
|
2024-02-15 13:08:05 -08:00
|
|
|
echo "Found python in v4 toolchain, setting python to ${python}"
|
2021-06-09 09:25:23 -05:00
|
|
|
elif [ -f "$(which python3)" ]; then
|
|
|
|
|
python=$(which python3)
|
2024-02-15 13:08:05 -08:00
|
|
|
echo "Could not find mongodbtoolchain python, using system python ${python}"
|
2021-06-09 09:25:23 -05:00
|
|
|
else
|
2024-02-15 13:08:05 -08:00
|
|
|
echo "Could not find python3."
|
2021-06-09 09:25:23 -05:00
|
|
|
return 1
|
|
|
|
|
fi
|
2021-04-28 13:12:09 -04:00
|
|
|
fi
|