refactor: move run/tool.* to scripts/bin.* (#22)

This commit is contained in:
sigoden
2024-06-06 11:40:09 +08:00
committed by GitHub
parent 6f82b1f53a
commit a144077aec
4 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -52,7 +52,7 @@ build-bin() {
_build_win_shim $lang > "$bin_file"
else
bin_file="$BIN_DIR/$basename"
ln -s "$PWD/run/tool.$lang" "$bin_file"
ln -s "$PWD/scripts/bin.$lang" "$bin_file"
fi
else
not_found_funcs+=("$name")
@@ -111,7 +111,7 @@ build-single-declaration() {
func="$1"
lang="${func##*.}"
cmd="$(_lang_to_cmd "$lang")"
LLM_FUNCTION_ACTION=declarate "$cmd" "run/tool.$lang" "$func"
LLM_FUNCTION_ACTION=declarate "$cmd" "scripts/bin.$lang" "$func"
}
# @cmd List functions that can be put into functions.txt
@@ -152,8 +152,8 @@ test-functions() {
echo "Test $cmd_path: $(cat)"
}
if ! _is_win; then
"$cmd" "run/tool.$lang" "$func" "$data" | {
echo "Test $cmd run/tool.$lang $func: $(cat)"
"$cmd" "scripts/bin.$lang" "$func" "$data" | {
echo "Test $cmd scripts/bin.$lang $func: $(cat)"
}
fi
fi
@@ -174,7 +174,7 @@ install() {
fi
}
# @cmd Show versions of required tools for bug reports.
# @cmd Show pre-requisite tool versions
version() {
uname -a
argc --argc-version
+1 -1
View File
@@ -7,7 +7,7 @@ function parseArgv() {
let func_file = process.argv[1];
let func_data = null;
if (func_file.endsWith("tool.js")) {
if (func_file.endsWith("bin.js")) {
func_file = process.argv[2]
func_data = process.argv[3]
} else {
+1 -1
View File
@@ -9,7 +9,7 @@ def parse_argv():
func_file = sys.argv[0]
func_data = None
if func_file.endswith("tool.py"):
if func_file.endswith("bin.py"):
func_file = sys.argv[1] if len(sys.argv) > 1 else None
func_data = sys.argv[2] if len(sys.argv) > 2 else None
else:
+1 -1
View File
@@ -7,7 +7,7 @@ if [[ -f "$LLM_FUNCTIONS_DIR/.env" ]]; then
source "$LLM_FUNCTIONS_DIR/.env"
fi
if [[ "$0" == *tool.sh ]]; then
if [[ "$0" == *bin.sh ]]; then
FUNC_FILE="$1"
FUNC_DATA="$2"
else