If LEDGER_FILE was seen, ignore LEDGER.

This commit is contained in:
John Wiegley 2009-02-08 19:54:16 -04:00
parent 22ac8165f4
commit 455b6e27cb

View file

@ -300,12 +300,18 @@ void global_scope_t::read_environment_settings(char * envp[])
#if 1 #if 1
// These are here for backwards compatability, but are deprecated. // These are here for backwards compatability, but are deprecated.
if (const char * p = std::getenv("LEDGER")) if (const char * p = std::getenv("LEDGER")) {
process_option("file", report(), p, "LEDGER"); if (! std::getenv("LEDGER_FILE"))
if (const char * p = std::getenv("LEDGER_INIT")) process_option("file", report(), p, "LEDGER");
process_option("init-file", report(), p, "LEDGER_INIT"); }
if (const char * p = std::getenv("PRICE_HIST")) if (const char * p = std::getenv("LEDGER_INIT")) {
process_option("price-db", report(), p, "PRICE_HIST"); if (! std::getenv("LEDGER_INIT_FILE"))
process_option("init-file", report(), p, "LEDGER_INIT");
}
if (const char * p = std::getenv("PRICE_HIST")) {
if (! std::getenv("LEDGER_PRICEDB"))
process_option("price-db", report(), p, "PRICE_HIST");
}
if (const char * p = std::getenv("PRICE_EXP")) if (const char * p = std::getenv("PRICE_EXP"))
process_option("price-exp", report(), p, "PRICE_EXP"); process_option("price-exp", report(), p, "PRICE_EXP");
#endif #endif