refactor: rename scripts (#29)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
@@ -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:
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user