refactor: move run/tool.* to scripts/bin.* (#22)
This commit is contained in:
+5
-5
@@ -52,7 +52,7 @@ build-bin() {
|
|||||||
_build_win_shim $lang > "$bin_file"
|
_build_win_shim $lang > "$bin_file"
|
||||||
else
|
else
|
||||||
bin_file="$BIN_DIR/$basename"
|
bin_file="$BIN_DIR/$basename"
|
||||||
ln -s "$PWD/run/tool.$lang" "$bin_file"
|
ln -s "$PWD/scripts/bin.$lang" "$bin_file"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
not_found_funcs+=("$name")
|
not_found_funcs+=("$name")
|
||||||
@@ -111,7 +111,7 @@ build-single-declaration() {
|
|||||||
func="$1"
|
func="$1"
|
||||||
lang="${func##*.}"
|
lang="${func##*.}"
|
||||||
cmd="$(_lang_to_cmd "$lang")"
|
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
|
# @cmd List functions that can be put into functions.txt
|
||||||
@@ -152,8 +152,8 @@ test-functions() {
|
|||||||
echo "Test $cmd_path: $(cat)"
|
echo "Test $cmd_path: $(cat)"
|
||||||
}
|
}
|
||||||
if ! _is_win; then
|
if ! _is_win; then
|
||||||
"$cmd" "run/tool.$lang" "$func" "$data" | {
|
"$cmd" "scripts/bin.$lang" "$func" "$data" | {
|
||||||
echo "Test $cmd run/tool.$lang $func: $(cat)"
|
echo "Test $cmd scripts/bin.$lang $func: $(cat)"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -174,7 +174,7 @@ install() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# @cmd Show versions of required tools for bug reports.
|
# @cmd Show pre-requisite tool versions
|
||||||
version() {
|
version() {
|
||||||
uname -a
|
uname -a
|
||||||
argc --argc-version
|
argc --argc-version
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function parseArgv() {
|
|||||||
let func_file = process.argv[1];
|
let func_file = process.argv[1];
|
||||||
let func_data = null;
|
let func_data = null;
|
||||||
|
|
||||||
if (func_file.endsWith("tool.js")) {
|
if (func_file.endsWith("bin.js")) {
|
||||||
func_file = process.argv[2]
|
func_file = process.argv[2]
|
||||||
func_data = process.argv[3]
|
func_data = process.argv[3]
|
||||||
} else {
|
} else {
|
||||||
@@ -9,7 +9,7 @@ def parse_argv():
|
|||||||
func_file = sys.argv[0]
|
func_file = sys.argv[0]
|
||||||
func_data = None
|
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_file = sys.argv[1] if len(sys.argv) > 1 else None
|
||||||
func_data = sys.argv[2] if len(sys.argv) > 2 else None
|
func_data = sys.argv[2] if len(sys.argv) > 2 else None
|
||||||
else:
|
else:
|
||||||
@@ -7,7 +7,7 @@ if [[ -f "$LLM_FUNCTIONS_DIR/.env" ]]; then
|
|||||||
source "$LLM_FUNCTIONS_DIR/.env"
|
source "$LLM_FUNCTIONS_DIR/.env"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$0" == *tool.sh ]]; then
|
if [[ "$0" == *bin.sh ]]; then
|
||||||
FUNC_FILE="$1"
|
FUNC_FILE="$1"
|
||||||
FUNC_DATA="$2"
|
FUNC_DATA="$2"
|
||||||
else
|
else
|
||||||
Reference in New Issue
Block a user