12345678910111213141516171819202122 |
- #include "web_vendor.h"
- int main(int argc, char *argv[])
- {
- printf("enter\n");
- fflush(stdout);
- HTELINK_LOG_ENABLE(true);
- HTELINK_LOG_INFO("check env set");
- if (getenv(VENDOR_RUN_PATH_ENV) == nullptr) {
- HTELINK_LOG_INFO("execute env not set");
- std::string exe_dir = utils::get_executable_directory();
- setenv(VENDOR_RUN_PATH_ENV, exe_dir.c_str(), 1);
- }
- HTELINK_LOG_INFO("execute directory is %s", getenv(VENDOR_RUN_PATH_ENV));
- vendor::VendorBase *vdor = new WebVendor();
- if (vendor::VendorBase::ParseOptionArgs(vdor, argc, argv) != 0) {
- exit(-1);
- }
- return vdor->Exec();
- }
|