Skip to content

Commit

Permalink
Fixed looping through possible python installation names on unix
Browse files Browse the repository at this point in the history
  • Loading branch information
quintindunn committed Oct 21, 2023
1 parent af1d4e8 commit 57a8b22
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
echo "Setting up server"
echo "Searching for python3 executable..."

python_names=("python3")
python_names="python3 python py3 py"
found_version=0

for python_exe in "${python_names[@]}"; do
for python_exe in $python_names; do
echo $python_exe
echo "Checking for $python_exe in path"

if command -v "$python_exe" >/dev/null 2>&1; then
Expand All @@ -22,7 +23,7 @@ done
if [ "$found_version" -eq 1 ]; then
echo "Found python 3.7 or greater in path!"
if [ ! -d "venv" ]; then
echo "Creating virtual environment."
echo "Creating virtual environment, this might take a few minutes."

if ! dpkg -l | grep -q "python3-venv"; then
echo "Installing python3-venv..."
Expand Down

0 comments on commit 57a8b22

Please sign in to comment.