diff options
| author | sigoden <sigoden@gmail.com> | 2024-06-07 21:36:34 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-07 21:36:34 +0800 |
| commit | 63df67acea19b3708d34ef3b656c1b784c2a72f4 (patch) | |
| tree | 740ff6c276131898e59bf1495abc238d3fdfb9a7 /scripts/create-tool.sh | |
| parent | e1d895cc9abb0f7ffac8acc043746cbe2e5f4fe1 (diff) | |
| download | llm-functions-docker-63df67acea19b3708d34ef3b656c1b784c2a72f4.tar.gz | |
refactor: numerous improvements (#32)
Diffstat (limited to 'scripts/create-tool.sh')
| -rwxr-xr-x | scripts/create-tool.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/create-tool.sh b/scripts/create-tool.sh index ff0ce5e..14e0ac3 100755 --- a/scripts/create-tool.sh +++ b/scripts/create-tool.sh @@ -20,15 +20,15 @@ main() { ext="${argc_name##*.}" support_exts=('.sh' '.js' '.py') if [[ "$ext" == "$argc_name" ]]; then - _die "No extension name, pelease add one of ${support_exts[*]}" + _die "error: no extension name, pelease add one of ${support_exts[*]}" fi case $ext in sh) create_sh ;; js) create_js ;; py) create_py ;; - *) _die "Invalid extension name: $ext, must be one of ${support_exts[*]}" ;; + *) _die "error: invalid extension name: $ext, must be one of ${support_exts[*]}" ;; esac - _die "$output generated" + echo "$output generated" } create_sh() { @@ -187,7 +187,7 @@ build_properties() { } _die() { - echo "$*" + echo "$*" >&2 exit 1 } |
