mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Add get_source_compile_path to return dir for keeping source
This commit is contained in:
parent
724a1ab8cc
commit
b1de3823a3
16
lib/utils.sh
16
lib/utils.sh
@ -28,6 +28,21 @@ get_install_path() {
|
||||
}
|
||||
|
||||
|
||||
get_source_compile_path() {
|
||||
local plugin=$1
|
||||
local install_type=$2
|
||||
local version=$3
|
||||
mkdir -p $(asdf_dir)/sources/${plugin}
|
||||
|
||||
if [ $install_type = "version" ]
|
||||
then
|
||||
echo $(asdf_dir)/sources/${plugin}/${version}
|
||||
else
|
||||
echo $(asdf_dir)/sources/${plugin}/${install_type}-${version}
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
check_if_plugin_exists() {
|
||||
if [ ! -d $1 ]
|
||||
then
|
||||
@ -36,6 +51,7 @@ check_if_plugin_exists() {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
check_if_version_exists() {
|
||||
local plugin=$1
|
||||
local version=$2
|
||||
|
Loading…
Reference in New Issue
Block a user