diff options
| author | sigoden <sigoden@gmail.com> | 2024-06-05 18:37:52 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-05 18:37:52 +0800 |
| commit | 005d23030dab2b7708996e779dc78dd5f8ebdb8d (patch) | |
| tree | 0d05583d462a4795a4236a5006befc096047e969 /Argcfile.sh | |
| parent | 7e3f47093f2dcb36cf94a35403027ec72bf7b084 (diff) | |
| download | llm-functions-docker-005d23030dab2b7708996e779dc78dd5f8ebdb8d.tar.gz | |
feat: adjust project structure (#16)
Diffstat (limited to 'Argcfile.sh')
| -rw-r--r-- | Argcfile.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Argcfile.sh b/Argcfile.sh index a9f2fb7..1031df8 100644 --- a/Argcfile.sh +++ b/Argcfile.sh @@ -46,14 +46,14 @@ build-bin() { for name in "${names[@]}"; do basename="${name%.*}" lang="${name##*.}" - func_file="$lang/$name" + func_file="tools/$lang/$name" if [[ -f "$func_file" ]]; then if _is_win; then bin_file="$BIN_DIR/$basename.cmd" _build_win_shim $lang > "$bin_file" else bin_file="$BIN_DIR/$basename" - ln -s "$PWD/cmd/cmd.$lang" "$bin_file" + ln -s "$PWD/run/tool.$lang" "$bin_file" fi else not_found_funcs+=("$name") @@ -85,7 +85,7 @@ build-declarations-json() { build_failed_funcs=() for name in "${names[@]}"; do lang="${name##*.}" - func_file="$lang/$name" + func_file="tools/$lang/$name" if [[ ! -f "$func_file" ]]; then not_found_funcs+=("$name") continue; @@ -112,7 +112,7 @@ build-single-declaration() { func="$1" lang="${func##*.}" cmd="$(_lang_to_cmd "$lang")" - LLM_FUNCTION_ACTION=declarate "$cmd" "cmd/cmd.$lang" "$func" + LLM_FUNCTION_ACTION=declarate "$cmd" "run/tool.$lang" "$func" } # @cmd List functions that can be put into functions.txt @@ -154,8 +154,8 @@ test-functions() { echo "Test $cmd_path: $(cat)" } if ! _is_win; then - "$cmd" "cmd/cmd.$lang" "$func" "$data" | { - echo "Test $cmd cmd/cmd.$lang $func: $(cat)" + "$cmd" "run/tool.$lang" "$func" "$data" | { + echo "Test $cmd run/tool.$lang $func: $(cat)" } fi fi @@ -242,7 +242,7 @@ _choice_func() { lang="${item%:*}" cmd="${item#*:}" if command -v "$cmd" &> /dev/null; then - ls -1 $lang | grep "\.$lang$" + ls -1 tools/$lang | grep "\.$lang$" fi done } |
