diff options
Diffstat (limited to 'src/crawl/crawl.cpp')
-rwxr-xr-x | src/crawl/crawl.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/crawl/crawl.cpp b/src/crawl/crawl.cpp index 88f6aa3..147b2cc 100755 --- a/src/crawl/crawl.cpp +++ b/src/crawl/crawl.cpp @@ -14,6 +14,7 @@ #include "LuaVM.hpp" +#include "StringUtils.hpp" #include "FileUtils.hpp" #include <set> @@ -97,15 +98,23 @@ int main( int /* argc */, char *argv[] ) << ( modulesSearchRecursive ? "(recursive)" : "" ); vector<string> entries = directory_entries( modulePath, true, modulesSearchRecursive ); - vector<string>::const_iterator it, end = entries.end( ); - for( it = entries.begin( ); it != end; it++ ) { - cout << (*it) << endl; - } vector<string> modules = luaVm.getStringArray( "modules.urlnormalizers" ); - end = modules.end( ); - for( it = modules.begin( ); it != end; it++ ) { - cout << (*it) << endl; + vector<string>::const_iterator it2, end2 = modules.end( ); + for( it2 = modules.begin( ); it2 != end2; it2++ ) { +#ifndef _WIN32 + string module = (*it2) + ".so"; +#else + string module = (*it2) + ".dll"; +#endif + cout << "Searching for module '" << module << "'" << endl; + + vector<string>::const_iterator it, end = entries.end( ); + for( it = entries.begin( ); it != end; it++ ) { + if( endswith( (*it), module ) ) { + cout << " Found inf file '" << (*it) << "'" << endl; + } + } } vector<string> normalizerModules; |