diff options
author | Adam Borowski <kilobyte@angband.pl> | 2014-01-07 19:36:21 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2014-01-07 19:36:21 +0100 |
commit | 9e23fff017e6c2bb361abd1ba37b3da93021fa5c (patch) | |
tree | 50e9e1aee5590f06f0cd9b3b7cf8aadf727ea16a /crawl-ref/source/util | |
parent | 29eb58705220340e35493b02afe59553237813e3 (diff) | |
download | crawl-ref-9e23fff017e6c2bb361abd1ba37b3da93021fa5c.tar.gz crawl-ref-9e23fff017e6c2bb361abd1ba37b3da93021fa5c.zip |
Teach db_lint how to check backgrounds.txt
Diffstat (limited to 'crawl-ref/source/util')
-rwxr-xr-x | crawl-ref/source/util/db_lint | 5 | ||||
-rwxr-xr-x | crawl-ref/source/util/gather_backgrounds | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/crawl-ref/source/util/db_lint b/crawl-ref/source/util/db_lint index 21a1f23034..33252bd48d 100755 --- a/crawl-ref/source/util/db_lint +++ b/crawl-ref/source/util/db_lint @@ -298,7 +298,10 @@ if (read_file("descript/species")) check_desc_needed("species", `util/gather_species -d`); } -read_file("descript/backgrounds"); +if (read_file("descript/backgrounds")) +{ + check_desc_needed("background", `util/gather_backgrounds`); +} __________________________________________________________________________(); read_file("database/$_") for qw(randname rand_wpn rand_arm rand_all randbook monname); check_db_locals(); diff --git a/crawl-ref/source/util/gather_backgrounds b/crawl-ref/source/util/gather_backgrounds new file mode 100755 index 0000000000..d419182905 --- /dev/null +++ b/crawl-ref/source/util/gather_backgrounds @@ -0,0 +1,11 @@ +#!/usr/bin/perl -w + +undef $/; +open IN, "util/cpp_version jobs.cc|" or die "Can't read jobs.cc\n"; +$_ = <IN>; +close IN; + +s/.*Job_Name_List\[\s*NUM_JOBS\s*\] =\n\s*\{(.*?)\}.*/$1/s + or die "Can't find Job_Name_List in jobs.cc\n"; + +print "$_\n" for (/"([^"]*)"/g); |