+
+ if(pkgname == "*") // =========================================== load all boxes (e.g. std/boxes/*)
+ {
+ std::string path;
+ std::vector<std::string>::iterator i;
+ std::string fullDirectoryName;
+ for (i=script_paths.begin();i!=script_paths.end();++i)
+ {
+ path = *i;
+
+ // we *really* want '.' to be the current working directory
+ if (path == ".") {
+ char buf[2048]; // for getcwd
+ char * currentDir = getcwd(buf, 2048);
+ std::string cwd(currentDir);
+ path = currentDir;
+ }
+
+ fullDirectoryName = Utilities::MakePkgnameFromPath(path, upath, false);
+//std::cout <<"fullpath [" << fullDirectoryName << "]" <<std::endl;
+ // Check if library exists
+ if ( ! Utilities::IsDirectory(fullDirectoryName) )
+ {
+ // The following is *NOT* a debug time message :
+ // It's a user intended message.
+ // Please don't remove it.
+ if (verbose)
+ std::cout <<" [" <<fullDirectoryName <<"] : doesn't exist" <<std::endl;
+ continue; // try next path
+ }
+ foundFile = true;
+
+ std::cout << "recherche tous les .bbs du directory" << std::endl;
+ std::cout << "pour chacun, LoadScript" << std::endl;
+
+ std::vector<std::string> Filenames;
+ int nbFiles = Utilities::Explore(fullDirectoryName, false, Filenames);
+// std::cout << "=================nbFiles " << nbFiles << std::endl;
+ int nbBssFiles = 0;
+ for (std::vector<std::string>::iterator i = Filenames.begin(); i!=Filenames.end(); ++i)
+ {
+ if ((*i).substr((*i).size()-4, 4) != ".bbs")
+ continue; // ignore non .bbs files
+ LoadScript(*i);
+ nbBssFiles++;
+ }
+ if (nbBssFiles==0)
+ if (verbose)
+ std::cout << "WARNING : No '.bbs' file found in [" << fullDirectoryName << "]" << std::endl;
+
+ break; // a directory was found; we stop iterating
+ }
+ return;
+ }
+