mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Use installs/<package>/<version> as installation dir
This commit is contained in:
parent
7b9f905870
commit
1df29d6913
16
lib/asdf.sh
16
lib/asdf.sh
@ -29,25 +29,17 @@ install_command() {
|
||||
local version="${version_info[0]}"
|
||||
fi
|
||||
|
||||
local install_path=$(get_install_path $package $version)
|
||||
local install_path=$(get_install_path $package $full_version)
|
||||
${source_path}/install $install_type $version $install_path "${@:3}"
|
||||
|
||||
if [ $? -e 0 ]
|
||||
then
|
||||
echo "$version $(basename $install_path)" >> $(dirname $install_path)/.versions
|
||||
#TODO create shims for new version
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
get_install_path() {
|
||||
local package=$1
|
||||
local versio=$2
|
||||
mkdir -p $(asdf_dir)/installs/$package
|
||||
local version=$2
|
||||
mkdir -p $(asdf_dir)/installs/${package}
|
||||
|
||||
echo $(asdf_dir)/installs/$package/$(generate_random_hash)
|
||||
echo $(asdf_dir)/installs/${package}/${version}
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,11 +13,6 @@ asdf_dir() {
|
||||
}
|
||||
|
||||
|
||||
generate_random_hash() {
|
||||
openssl rand -hex 4
|
||||
}
|
||||
|
||||
|
||||
run_callback_if_command() {
|
||||
if [ "$1" = "$2" ]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user