Commits for msvc 16.9
This commit is contained in:
+10
-1
@@ -23,14 +23,23 @@ bool fileExist(const char *fname) {
|
||||
void downloadWeightsifDoNotExist(const std::string& input_bin, const std::string& test_folder, const std::string& weights_url){
|
||||
if(!fileExist(input_bin.c_str())){
|
||||
std::string mkdir_cmd = "mkdir " + test_folder;
|
||||
std::string wget_cmd = "wget " + weights_url + " -O " + test_folder + "/weights.zip";
|
||||
std::string wget_cmd = "curl " + weights_url + " --output " + test_folder + "/weights.zip";
|
||||
#ifdef __linux__
|
||||
std::string unzip_cmd = "unzip " + test_folder + "/weights.zip -d" + test_folder;
|
||||
std::string rm_cmd = "rm " + test_folder + "/weights.zip";
|
||||
|
||||
#elif _WIN32
|
||||
|
||||
std::string unzip_cmd = "7z x " + test_folder + "/weights.zip -o" + test_folder;
|
||||
#endif
|
||||
int err = 0;
|
||||
err = system(mkdir_cmd.c_str());
|
||||
err = system(wget_cmd.c_str());
|
||||
err = system(unzip_cmd.c_str());
|
||||
#ifdef __linux__
|
||||
err = system(rm_cmd.c_str());
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user