Skip to content

Commit

Permalink
Update supported python versions and order from highest to lowest.
Browse files Browse the repository at this point in the history
  • Loading branch information
itsTheFae committed Dec 23, 2024
1 parent 42850a1 commit 57816d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ DEBUG=0

#----------------------------------------------Constants----------------------------------------------#
# Suported versions of python using only major.minor format
PySupported=("3.8" "3.9" "3.10" "3.11" "3.12")
PySupported=("3.13" "3.12" "3.11" "3.10" "3.9" "3.8")
PyBin="python3"
# Path updated by find_python
PyBinPath="$(command -v "$PyBin")"
Expand Down Expand Up @@ -195,23 +195,23 @@ function find_python() {
if [[ $PY_VER_MINOR -eq 8 ]]; then
# if 3.8, patch version minimum is 3.8.7
if [[ $PY_VER_PATCH -ge 7 ]]; then
PyBinPath="$(command -v "$PyBinTest")"
PyBinPath="$(which "$PyBinTest")"
PyBin="$PyBinTest"
debug "Selected: $PyBinTest @ $PyBinPath"
return 0
fi
fi
# if 3.9+ it should work.
if [[ $PY_VER_MINOR -ge 9 ]]; then
PyBinPath="$(command -v "$PyBinTest")"
PyBinPath="$(which "$PyBinTest")"
PyBin="$PyBinTest"
debug "Selected: $PyBinTest @ $PyBinPath"
return 0
fi
fi
done

PyBinPath="$(command -v "python3")"
PyBinPath="$(which "python3")"
PyBin="python3"
debug "Default: python3 @ $PyBinPath"
return 1
Expand Down Expand Up @@ -586,13 +586,14 @@ function debug() {
function configure_bot() {
echo "You can now configure MusicBot!"
read -rp "Would like to launch the 'configure.py' tool? [N/y]" YesConfig
if [ "${YesConfig,,}" != "y" ] && [ "${YesConfig,,}" != "yes" ] ; then
if [[ "${YesConfig,,}" != "y" && "${YesConfig,,}" != "yes" ]] ; then
echo ""
echo "Open the 'config' directory, then copy and rename the example files to get started."
echo "Make sure to add your Bot token to the options.ini 'Token' option before starting."
return
fi

$PyBin "${InstallDir}/configure.py"
$PyBin "configure.py"
}

#------------------------------------------CLI Arguments----------------------------------------------#
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if [ -f "../bin/activate" ] ; then
fi

# Suported versions of python using only major.minor format
PySupported=("3.8" "3.9" "3.10" "3.11" "3.12")
PySupported=("3.13" "3.12" "3.11" "3.10" "3.9""3.8")

# compile a list of bin names to try for.
PyBins=("python3") # We hope that python3 maps to a good version.
Expand Down
2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ -f "../bin/activate" ] ; then
fi

# Suported versions of python using only major.minor format
PySupported=("3.8" "3.9" "3.10" "3.11" "3.12")
PySupported=("3.13" "3.12" "3.11" "3.10" "3.9""3.8")

# compile a list of bin names to try for.
PyBins=("python3") # We hope that python3 maps to a good version.
Expand Down

0 comments on commit 57816d6

Please sign in to comment.