Initial Commit

This commit is contained in:
Benjamin Swartley
2026-09-19 22:59:19 -05:00
commit edfb3c9c46
5 changed files with 67 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
COMPETITION = competition.yml
CATEGORIES != yq '.Categories | keys.[]' $(COMPETITION)
PEOPLE != yq '.People.[]' $(COMPETITION)
FIND_CAT_CHALLS = $(let CAT,$1,$(shell yq ".Categories.$(CAT).[]" $(COMPETITION)))
CHALLS=$(foreach CAT,\
$(CATEGORIES),\
$(foreach CHALL,\
$(patsubst "%",%,$(call FIND_CAT_CHALLS,$(CAT))),\
$(patsubst "%",%,$(CAT))/$(CHALL)\
)\
)
printVerifiedFlags: $(CHALLS)
find . -name 'Questions.yml' \
| xargs -n1 yq -c '.Questions.[].Question | select((.VerifiedBy != null) and (.Submitted == false)) | (.Text, .Flag)'
$(CHALLS):
mkdir -p $(foreach PERSON,$(patsubst "%",%,$(PEOPLE)),$(@)/$(PERSON))
mkdir -p $(@)/files
find $(@) -type d -mindepth 1 -exec touch {}/.gitkeep \;
cp ./.Questions.yml $(@)/Questions.yml