Skip to content

Commit

Permalink
feat: tools.txt/agents.txt support comments (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Jun 26, 2024
1 parent 444b4b2 commit ff3ee31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Argcfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit ff3ee31

Please sign in to comment.