mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Moved erlang plugin to to HashNuke/asdf-erlang
This commit is contained in:
parent
2867d74f20
commit
aa050b6152
@ -1,73 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
install_erlang() {
|
||||
local install_type=$1
|
||||
local version=$2
|
||||
local install_path=$3
|
||||
local source_path=$(get_download_file_path $install_type $version)
|
||||
|
||||
download_source $install_type $version
|
||||
|
||||
# running this in a subshell
|
||||
# because we don't want to disturb current working dir
|
||||
(
|
||||
cd $(dirname $source_path)
|
||||
tar zxf $source_path || exit 1
|
||||
cd $(untar_path $install_type $version)
|
||||
if [ "$install_type" != "version" ]
|
||||
then
|
||||
./otp_build autoconf || exit 1
|
||||
fi
|
||||
./configure --prefix=$install_path || exit 1
|
||||
make || exit 1
|
||||
make install || exit 1
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
untar_path() {
|
||||
local install_type=$1
|
||||
local version=$2
|
||||
|
||||
if [ "$install_type" = "version" ]
|
||||
then
|
||||
echo "$TMPDIR/otp_src_${version}"
|
||||
else
|
||||
echo "$TMPDIR/otp-${version}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
download_source() {
|
||||
local install_type=$1
|
||||
local version=$2
|
||||
local download_path=$(get_download_file_path $install_type $version)
|
||||
local download_url=$(get_download_url $install_type $version)
|
||||
|
||||
curl -Lo $download_path -C - $download_url
|
||||
}
|
||||
|
||||
|
||||
get_download_file_path() {
|
||||
local install_type=$1
|
||||
local version=$2
|
||||
local pkg_name="otp-${install_type}-${version}-src.tar.gz"
|
||||
|
||||
echo "$TMPDIR$pkg_name"
|
||||
}
|
||||
|
||||
|
||||
get_download_url() {
|
||||
local install_type=$1
|
||||
local version=$2
|
||||
|
||||
if [ "$install_type" = "version" ]
|
||||
then
|
||||
echo "http://www.erlang.org/download/otp_src_${version}.tar.gz"
|
||||
else
|
||||
echo "https://github.com/erlang/otp/archive/${version}.tar.gz"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
install_erlang $@
|
@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
versions=(
|
||||
17.3
|
||||
17.1
|
||||
17.0
|
||||
R16B03-1
|
||||
R16B03
|
||||
R16B02
|
||||
R16B01
|
||||
R16B
|
||||
R16A
|
||||
R15B03-1
|
||||
R15B02
|
||||
R15B01
|
||||
R15B
|
||||
)
|
||||
|
||||
for version in "${versions[@]}"
|
||||
do
|
||||
echo $version
|
||||
done
|
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
|
||||
uninstall_erlang() {
|
||||
local install_type=$1
|
||||
local version=$2
|
||||
local install_path=$3
|
||||
|
||||
rm -rf $install_path
|
||||
}
|
||||
|
||||
uninstall_erlang $@
|
Loading…
Reference in New Issue
Block a user