From e5dd2070979ba2da5f39583ccf227f21c1274345 Mon Sep 17 00:00:00 2001 From: Daniel Perez Date: Sun, 24 Apr 2016 21:15:49 +0900 Subject: [PATCH] Add python shims. --- shims/python | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 shims/python diff --git a/shims/python b/shims/python new file mode 100755 index 0000000..fc26e6e --- /dev/null +++ b/shims/python @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +source $(dirname $(dirname $0))/lib/utils.sh + +run_python() { + plugin_name="python" + + full_version=$(get_preset_version_for $plugin_name) + + 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 /home/daniel/.asdf/bin/private/asdf-exec python bin/python${short_python_version} +} + +run_python