mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Support bash 3.x in our evals setup script (#2248)
This commit is contained in:
parent
71bdd72ca8
commit
49a61ca30f
1 changed files with 10 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
menu() {
|
||||
echo -e "\n📋 Which eval types would you like to support?\n"
|
||||
|
|
@ -16,6 +16,14 @@ menu() {
|
|||
echo -e " q) quit\n"
|
||||
}
|
||||
|
||||
has_asdf_plugin() {
|
||||
local plugin="$1"
|
||||
case "$plugin" in
|
||||
nodejs|python|golang|rust) echo "true" ;;
|
||||
*) echo "false" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
build_extension() {
|
||||
echo "🔨 Building the Roo Code extension..."
|
||||
cd ..
|
||||
|
|
@ -36,9 +44,6 @@ fi
|
|||
options=("nodejs" "python" "golang" "rust" "java")
|
||||
binaries=("node" "python" "go" "rustc" "javac")
|
||||
|
||||
declare -A has_asdf_plugin
|
||||
has_asdf_plugin=([nodejs]=true [python]=true [golang]=true [rust]=true [java]=false)
|
||||
|
||||
for i in "${!options[@]}"; do
|
||||
choices[i]="*"
|
||||
done
|
||||
|
|
@ -163,7 +168,7 @@ for i in "${!options[@]}"; do
|
|||
plugin="${options[$i]}"
|
||||
binary="${binaries[$i]}"
|
||||
|
||||
if [[ "${has_asdf_plugin[$plugin]}" == "true" ]]; then
|
||||
if [[ "$(has_asdf_plugin "$plugin")" == "true" ]]; then
|
||||
if ! asdf plugin list | grep -q "^${plugin}$" && ! command -v "${binary}" &>/dev/null; then
|
||||
echo "📦 Installing ${plugin} asdf plugin..."
|
||||
asdf plugin add "${plugin}" || exit 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue