Skip to content
Snippets Groups Projects
Commit 3133c9d1 authored by Whitney Armstrong's avatar Whitney Armstrong Committed by Stephen A. Wood
Browse files

If DB_DIR is not set, set to default value of "DBASE"

parent 01dfb9b1
No related branches found
No related tags found
No related merge requests found
...@@ -7,12 +7,24 @@ ...@@ -7,12 +7,24 @@
#include "THcInterface.h" #include "THcInterface.h"
#include <iostream> #include <iostream>
#include <cstring> #include <cstring>
#include <string>
#include <cstdlib>
using namespace std; using namespace std;
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
// Create a ROOT-style interactive interface // Create a ROOT-style interactive interface
//
if (!std::getenv("DB_DIR")) {
std::string db_dir_env = "DBASE";
if (setenv("DB_DIR", db_dir_env.c_str(), 1)) {
std::cout << "Failed to set env var DB_DIR\n";
} else {
std::cout << "DB_DIR set to DBASE\n";
}
}
// Handle convenience command line options // Handle convenience command line options
bool print_version = false, no_logo = false; bool print_version = false, no_logo = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment