Skip to content

Commit

Permalink
change order of asdf functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabriel committed Jun 27, 2024
1 parent 78e143b commit 6c95d39
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions lib/asdf_config_functions.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
function ASDFPlugin() {
ValidateExactFunctionParams 1 $# $FUNCNAME

if command -v asdf &>/dev/null; then
if ! asdf plugin list | grep $1 &>/dev/null; then
asdf_plugins+=($1)
ASDFPluginDependency $1
fi
else
asdf_plugins+=($1)
ASDFPluginDependency $1
fi
}

function ASDFPluginDependency() {
case $1 in
elixir)
__elixir
;;
golang)
__golang
;;
lua)
__lua
;;
java)
__java
;;
nodejs)
__nodejs
;;
ruby)
__ruby
;;
python)
__python
;;
php)
__php
;;
erlang)
__erlang
;;
stylua)
__stylua
;;
esac
}

function __elixir() {
Pkg unzip
Pkg inotify-tools
Expand Down Expand Up @@ -271,52 +320,3 @@ function __stylua() {
Pkg curl
Pkg unzip
}

function ASDFPluginDependency() {
case $1 in
elixir)
__elixir
;;
golang)
__golang
;;
lua)
__lua
;;
java)
__java
;;
nodejs)
__nodejs
;;
ruby)
__ruby
;;
python)
__python
;;
php)
__php
;;
erlang)
__erlang
;;
stylua)
__stylua
;;
esac
}

function ASDFPlugin() {
ValidateExactFunctionParams 1 $# $FUNCNAME

if command -v asdf &>/dev/null; then
if ! asdf plugin list | grep $1 &>/dev/null; then
asdf_plugins+=($1)
ASDFPluginDependency $1
fi
else
asdf_plugins+=($1)
ASDFPluginDependency $1
fi
}

0 comments on commit 6c95d39

Please sign in to comment.