aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-06-07 04:06:59 +0800
committerGitHub <noreply@github.com>2024-06-07 04:06:59 +0800
commit2b07fc2c7e4e6311d35ae72c17b25e47680d61f6 (patch)
tree813ea77176ccd89d91aa7b4e70771755eaf2cf41 /scripts
parent6d1ad27900634bd16089eb3fe847fe9583dcf3d9 (diff)
downloadllm-functions-docker-2b07fc2c7e4e6311d35ae72c17b25e47680d61f6.tar.gz
refactor: rename scripts (#29)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create-tool.sh (renamed from scripts/create.sh)1
-rwxr-xr-xscripts/run-tool.js (renamed from scripts/bin.js)2
-rwxr-xr-xscripts/run-tool.py (renamed from scripts/bin.py)2
-rwxr-xr-xscripts/run-tool.sh (renamed from scripts/bin.sh)2
4 files changed, 4 insertions, 3 deletions
diff --git a/scripts/create.sh b/scripts/create-tool.sh
index 0d558fa..40d2ef3 100755
--- a/scripts/create.sh
+++ b/scripts/create-tool.sh
@@ -5,6 +5,7 @@ set -e
# It automatically generate declaration json for `*.py` and `*.js` and generate `@option` tags for `.sh`.
# Examples:
# argc create abc.sh foo bar! baz+ qux*
+# ./scripts/create-tool.sh test.py foo bar! baz+ qux*
# @arg name! The script file name.
# @arg params* The script parameters
diff --git a/scripts/bin.js b/scripts/run-tool.js
index c7a440c..43a6587 100755
--- a/scripts/bin.js
+++ b/scripts/run-tool.js
@@ -7,7 +7,7 @@ function parseArgv() {
let funcName = process.argv[1];
let funcData = null;
- if (funcName.endsWith("bin.js")) {
+ if (funcName.endsWith("run-tool.js")) {
funcName = process.argv[2];
funcData = process.argv[3];
} else {
diff --git a/scripts/bin.py b/scripts/run-tool.py
index 0ea49ed..30968a1 100755
--- a/scripts/bin.py
+++ b/scripts/run-tool.py
@@ -9,7 +9,7 @@ def parse_argv():
func_name = sys.argv[0]
func_data = None
- if func_name.endswith("bin.py"):
+ if func_name.endswith("run-tool.py"):
func_name = sys.argv[1] if len(sys.argv) > 1 else None
func_data = sys.argv[2] if len(sys.argv) > 2 else None
else:
diff --git a/scripts/bin.sh b/scripts/run-tool.sh
index 807343a..6f5befc 100755
--- a/scripts/bin.sh
+++ b/scripts/run-tool.sh
@@ -7,7 +7,7 @@ if [[ -f "$LLM_FUNCTIONS_DIR/.env" ]]; then
source "$LLM_FUNCTIONS_DIR/.env"
fi
-if [[ "$0" == *bin.sh ]]; then
+if [[ "$0" == *run-tool.sh ]]; then
func_name="$1"
func_data="$2"
else