compute cards_per_set as a tab separated file

master
melvin 2013-03-08 11:05:46 +08:00
parent 973b44c4ea
commit 5981db37b1
1 changed files with 7 additions and 3 deletions

View File

@ -495,7 +495,11 @@ fix_eol:
sed -i -e 's/\x0D$$//' release/Magarena/**/*.txt
sed -i -e '$$a\' src/**/*.java
cards_per_set.txt: cards/existing_tip_full.txt
cards/cards_per_set.tsv: cards/existing_tip_full.txt
cat <(grep -o ", [A-Z0-9]* [A-Z]" $^ | cut -d' ' -f2) \
<(grep -o "^[A-Z0-9]* [A-Z]" $^ | cut -d' ' -f1) |\
sort | uniq -c | sort -n > $@
<(grep -o "^[A-Z0-9]* [A-Z]" $^ | cut -d' ' -f1) \
| sort \
| uniq -c \
| sort -n \
| sed 's/^ *//g;s/ /\t/' \
> $@