mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Replace var names
This commit is contained in:
parent
a59fddd265
commit
1bfabd67fb
@ -20,9 +20,9 @@ reshim_command() {
|
||||
generate_shims_for_version $plugin_name $full_version
|
||||
else
|
||||
# generate for all versions of the package
|
||||
local package_installs_path=$(asdf_dir)/installs/${plugin_name}
|
||||
local plugin_installs_path=$(asdf_dir)/installs/${plugin_name}
|
||||
|
||||
for install in ${package_installs_path}/*/; do
|
||||
for install in ${plugin_installs_path}/*/; do
|
||||
local full_version_name=$(echo $(basename $install) | sed 's/ref\-/ref\:/')
|
||||
generate_shims_for_version $plugin_name $full_version_name
|
||||
done
|
||||
|
12
lib/utils.sh
12
lib/utils.sh
@ -14,16 +14,16 @@ asdf_dir() {
|
||||
|
||||
|
||||
get_install_path() {
|
||||
local package=$1
|
||||
local plugin=$1
|
||||
local install_type=$2
|
||||
local version=$3
|
||||
mkdir -p $(asdf_dir)/installs/${package}
|
||||
mkdir -p $(asdf_dir)/installs/${plugin}
|
||||
|
||||
if [ $install_type = "version" ]
|
||||
then
|
||||
echo $(asdf_dir)/installs/${package}/${version}
|
||||
echo $(asdf_dir)/installs/${plugin}/${version}
|
||||
else
|
||||
echo $(asdf_dir)/installs/${package}/${install_type}-${version}
|
||||
echo $(asdf_dir)/installs/${plugin}/${install_type}-${version}
|
||||
fi
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ get_asdf_versions_file_path() {
|
||||
|
||||
|
||||
get_preset_version_for() {
|
||||
local package=$1
|
||||
local plugin=$1
|
||||
local asdf_versions_path=$(get_asdf_versions_file_path)
|
||||
|
||||
while read tool_line
|
||||
@ -86,7 +86,7 @@ get_preset_version_for() {
|
||||
local tool_name=$(echo "${tool_info[0]}" | xargs)
|
||||
local tool_version=$(echo "${tool_info[1]}" | xargs)
|
||||
|
||||
if [ "$tool_name" = "$package" ]
|
||||
if [ "$tool_name" = "$plugin" ]
|
||||
then
|
||||
echo $tool_version
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user