added rule to check that properties in script files are unique

master
melvin 2012-12-31 16:29:21 +08:00
parent 7ac663f887
commit 8b399125ba
1 changed files with 4 additions and 1 deletions

View File

@ -414,7 +414,7 @@ find_nulls: $(MAG)
flip -u $@
# meta check
check_all: check_aura check_requires_card_code check_script_name
check_all: check_aura check_requires_card_code check_script_name check_unique_key
# every aura must have an enchant property
check_aura:
@ -435,6 +435,9 @@ check_script_name:
<(ls -1 release/Magarena/scripts | sort) \
<(grep "name=" -r release/Magarena/scripts/ | sort | sed 's/.*name=//;s/[^A-Za-z0-9]/_/g;s/$$/.txt/')
check_unique_key:
grep = -r release/Magarena/scripts | sed 's/=.*//g' | sort | uniq -d
crash.txt: $(wildcard *.log)
for i in `grep "^Excep" -l $^`; do \
tail -n +`grep -n "random seed" $$i | tail -1 | cut -d':' -f1` $$i; \