aboutsummaryrefslogtreecommitdiffstats
path: root/Argcfile.sh
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-06-27 05:51:34 +0800
committerGitHub <noreply@github.com>2024-06-27 05:51:34 +0800
commitff3ee318d266064081c828f86d5a3c5109457729 (patch)
tree6a9912f06528035e0089edc695da41ee7af0ccc9 /Argcfile.sh
parent444b4b2a626327f74954e6a6f42d4bf48c948c4b (diff)
downloadllm-functions-docker-ff3ee318d266064081c828f86d5a3c5109457729.tar.gz
feat: tools.txt/agents.txt support comments (#50)
Diffstat (limited to 'Argcfile.sh')
-rw-r--r--Argcfile.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/Argcfile.sh b/Argcfile.sh
index ba142c4..a6e6e13 100644
--- a/Argcfile.sh
+++ b/Argcfile.sh
@@ -100,7 +100,7 @@ build-bin@tool() {
if [[ "${#argc_tools[@]}" -gt 0 ]]; then
names=("${argc_tools[@]}" )
elif [[ -f "$argc_names_file" ]]; then
- names=($(cat "$argc_names_file"))
+ names=($(cat "$argc_names_file" | grep -v '^#'))
if [[ "${#names[@]}" -gt 0 ]]; then
(cd "$BIN_DIR" && rm -rf "${names[@]}")
fi
@@ -140,7 +140,7 @@ build-declarations@tool() {
if [[ "${#argc_tools[@]}" -gt 0 ]]; then
names=("${argc_tools[@]}" )
elif [[ -f "$argc_names_file" ]]; then
- names=($(cat "$argc_names_file"))
+ names=($(cat "$argc_names_file" | grep -v '^#'))
fi
if [[ -z "$names" ]]; then
_die "error: not input tools, not found '$argc_names_file', please create it add some tools."
@@ -208,7 +208,7 @@ build-bin@agent() {
if [[ "${#argc_agents[@]}" -gt 0 ]]; then
names=("${argc_agents[@]}" )
elif [[ -f "$argc_names_file" ]]; then
- names=($(cat "$argc_names_file"))
+ names=($(cat "$argc_names_file" | grep -v '^#'))
if [[ "${#names[@]}" -gt 0 ]]; then
(cd "$BIN_DIR" && rm -rf "${names[@]}")
fi
@@ -252,7 +252,7 @@ build-declarations@agent() {
if [[ "${#argc_agents[@]}" -gt 0 ]]; then
names=("${argc_agents[@]}" )
elif [[ -f "$argc_names_file" ]]; then
- names=($(cat "$argc_names_file"))
+ names=($(cat "$argc_names_file" | grep -v '^#'))
fi
if [[ -z "$names" ]]; then
_die "error: not input agents, not found '$argc_names_file', please create it add some tools."