Skip to content

Commit

Permalink
Modified depgen script to accomodate multiple chat codes per build page
Browse files Browse the repository at this point in the history
  • Loading branch information
berdandy committed Oct 22, 2024
1 parent 6d4e274 commit ab61e26
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/depgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ FILES=$@

echo "{"
for i in $FILES; do
chatlink=$(grep -ohP '(?<=\[&)[A-Za-z0-9].+(?=\])' $i)
deps=$(chatr -D $chatlink)
echo "'$(basename $i)': " $deps ","
chatlinks=$(grep -ohP '(?<=\[&)[A-Za-z0-9].+(?=\])' $i)
for c in $chatlinks; do
deps=$(chatr -D $c)
depstring="${depstring:+$depstring, }$deps"
done
echo "\"$(basename $i)\": [$depstring]"
done
echo "}"

0 comments on commit ab61e26

Please sign in to comment.