Add lock function to prevent mod of chall files
This commit is contained in:
@@ -11,13 +11,22 @@ CHALLS=$(foreach CAT,\
|
|||||||
)\
|
)\
|
||||||
)
|
)
|
||||||
|
|
||||||
|
.PHONY: printVerifiedFlags
|
||||||
printVerifiedFlags: $(CHALLS)
|
printVerifiedFlags: $(CHALLS)
|
||||||
find . -name 'Questions.yml' \
|
find . -name 'Questions.yml' \
|
||||||
| xargs -n1 yq -c '.Questions.[].Question | select((.VerifiedBy != null) and (.Submitted == false)) | (.Text, .Flag)'
|
| xargs -n1 yq -c '.Questions.[].Question | select((.VerifiedBy != null) and (.Submitted == false)) | (.Text, .Flag)'
|
||||||
|
|
||||||
|
.PHONY: lock
|
||||||
|
lock: $(CHALLS)
|
||||||
|
find . -maxdepth 3 -type d -name files -exec chmod -R a-w {} \;
|
||||||
|
|
||||||
$(CHALLS):
|
$(CHALLS):
|
||||||
mkdir -p $(foreach PERSON,$(patsubst "%",%,$(PEOPLE)),$(@)/$(PERSON))
|
mkdir -p $(foreach PERSON,$(patsubst "%",%,$(PEOPLE)),$(@)/$(PERSON))
|
||||||
mkdir -p $(@)/files
|
mkdir -p $(@)/files
|
||||||
find $(@) -type d -mindepth 1 -exec touch {}/.gitkeep \;
|
find $(@) -type d -mindepth 1 -exec touch {}/.gitkeep \;
|
||||||
cp ./.Questions.yml $(@)/Questions.yml
|
cp ./.Questions.yml $(@)/Questions.yml
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
chmod -R a+w .
|
||||||
|
rm -rf $(CATEGORIES)
|
||||||
|
|||||||
Reference in New Issue
Block a user