From fc8a6666787b70aa748c1fcec96cfd40e2d065d7 Mon Sep 17 00:00:00 2001 From: melvin Date: Fri, 26 Aug 2011 20:22:21 +0800 Subject: [PATCH] added rule/script to check for string literals that contains the card name --- Makefile | 3 +++ scripts/check_literals.awk | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 scripts/check_literals.awk diff --git a/Makefile b/Makefile index 39cf99553b..e779bed22d 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,9 @@ EXE:=release/Magarena.exe all: $(MAG) $(EXE) tags +check_literals: + grep "\"" src/magic/card/* | awk -f scripts/check_literals.awk + cubes: \ release/mods/legacy_cube.txt \ release/mods/extended_cube.txt \ diff --git a/scripts/check_literals.awk b/scripts/check_literals.awk new file mode 100644 index 0000000000..39380fc7c4 --- /dev/null +++ b/scripts/check_literals.awk @@ -0,0 +1,13 @@ +BEGIN { + FS = "[_/\".]" +} + +{ + for (i = 5; i <= NF; i++) { + if ($i ~ $4) { + print $0 + break + } + } +} +