diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-11-22 00:07:49 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-11-22 20:08:41 +0100 |
commit | 440636cfb2a1d1304c976677e7571c917023d65c (patch) | |
tree | fc41beb3c998d6f72794290ba5aadd2375228ba6 /crawl-ref/source/initfile.cc | |
parent | a32b296a7ed8dc0b2aafddfc3f8a99b7b7376bcf (diff) | |
download | crawl-ref-440636cfb2a1d1304c976677e7571c917023d65c.tar.gz crawl-ref-440636cfb2a1d1304c976677e7571c917023d65c.zip |
Add an option, -builddb, to build the database and exit.
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r-- | crawl-ref/source/initfile.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 55a7a1f258..bc31bfdc33 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -3463,6 +3463,7 @@ enum commandline_option_type { CLO_MAPSTAT, CLO_ARENA, CLO_TEST, + CLO_BUILDDB, CLO_HELP, CLO_VERSION, CLO_EXTRA_OPT_FIRST, @@ -3474,8 +3475,8 @@ enum commandline_option_type { static const char *cmd_ops[] = { "scores", "name", "species", "job", "plain", "dir", "rc", "rcdir", "tscores", "vscores", "scorefile", "morgue", "macro", - "mapstat", "arena", "test", "help", "version", "extra-opt-first", - "extra-opt-last" + "mapstat", "arena", "test", "builddb", "help", "version", + "extra-opt-first", "extra-opt-last", }; const int num_cmd_ops = CLO_NOPS; @@ -3708,6 +3709,12 @@ bool parse_args( int argc, char **argv, bool rc_only ) } break; + case CLO_BUILDDB: + if (next_is_param) + return (false); + crawl_state.build_db = true; + break; + case CLO_MACRO: if (!next_is_param) return (false); |