aboutsummaryrefslogtreecommitdiffstats
path: root/tools/demo_sh.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/demo_sh.sh')
-rwxr-xr-xtools/demo_sh.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/tools/demo_sh.sh b/tools/demo_sh.sh
index da35e8f..11dc72b 100755
--- a/tools/demo_sh.sh
+++ b/tools/demo_sh.sh
@@ -1,3 +1,6 @@
+#!/usr/bin/env bash
+set -e
+
# @describe Demonstrate how to create a tool using Bash and how to use comment tags.
# @option --string! Define a required string property
# @option --string-enum![foo|bar] Define a required string property with enum
@@ -9,8 +12,17 @@
# @option --array-optional* Define a optional string array property
main() {
- ( set -o posix ; set ) | grep ^argc_
- printenv | grep '^LLM_'
+ cat <<EOF >> "$LLM_OUTPUT"
+string: ${argc_string}
+string_enum: ${argc_string_enum}
+string_optional: ${argc_string_optional}
+boolean: ${argc_boolean}
+integer: ${argc_integer}
+number: ${argc_number}
+array: ${argc_array[@]}
+array_optional: ${argc_array_optional[@]}
+$(printenv | grep '^LLM_')
+EOF
}
-eval "$(argc --argc-eval "$0" "$@")" \ No newline at end of file
+eval "$(argc --argc-eval "$0" "$@")"