2016-04-24 10:28:48 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
get_legacy_version() {
|
2017-01-22 09:31:29 +00:00
|
|
|
local current_directory="$1"
|
|
|
|
local python_version_file="$current_directory/.python-version"
|
2016-04-24 10:28:48 +01:00
|
|
|
|
|
|
|
# Get version from .python-version file. .python-version is used by pyenv
|
2017-01-22 09:31:29 +00:00
|
|
|
if [ -f "$python_version_file" ]; then
|
|
|
|
cat "$python_version_file"
|
2016-04-24 10:28:48 +01:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2017-01-22 09:31:29 +00:00
|
|
|
get_legacy_version "$1"
|