asdf/lib/commands/which.sh
2015-05-27 12:13:10 +05:30

16 lines
339 B
Bash

which_command() {
local plugin_name=$1
local plugin_path=$(get_plugin_path $plugin_name)
check_if_plugin_exists $plugin_path
full_version=$(get_preset_version_for $plugin_name)
if [ "$full_version" == "" ]; then
echo "No version set for ${plugin_name}"
exit -1
else
echo "$full_version"
exit 0
fi
}