asdf-python/shims/python

23 lines
538 B
Text
Raw Normal View History

2016-04-24 13:15:49 +01:00
#!/usr/bin/env bash
source $(dirname $(dirname $0))/lib/utils.sh
run_python() {
local plugin_name="python"
2016-04-24 13:15:49 +01:00
local full_version=$(get_preset_version_for $plugin_name)
2016-04-24 13:15:49 +01:00
if [ "$full_version" == "" ]; then
echo "No version set for ${plugin_name}"
exit -1
fi
IFS='.' read -r -a splitted_version <<< "$full_version"
local short_python_version="${splitted_version[0]}.${splitted_version[1]}"
exec $(asdf_dir)/bin/private/asdf-exec python bin/python${short_python_version} "$@"
2016-04-24 13:15:49 +01:00
}
2016-11-03 09:41:32 +00:00
run_python "$@"