From: Daniel Gonzalez Date: Wed, 2 Jan 2013 12:51:20 +0000 (+0100) Subject: Bug #1877 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=78c01493e903e0113e2c8b1527ad7544ea5fa565;p=bbtk.git Bug #1877 PlugPackage doesn't work with new Creatis Copyright headers. Now skipping '#' comment lines before taking package name. --- diff --git a/kernel/appli/bbPlugPackage/bbPlugPackage.cpp b/kernel/appli/bbPlugPackage/bbPlugPackage.cpp index 6dbe260..bf60814 100644 --- a/kernel/appli/bbPlugPackage/bbPlugPackage.cpp +++ b/kernel/appli/bbPlugPackage/bbPlugPackage.cpp @@ -42,7 +42,12 @@ int main(int argc, char **argv) } std::string path(argv[1]); + #ifdef WIN32 + std::string fname = path + "\\bbtkPackage"; + #else std::string fname = path + "/bbtkPackage"; + #endif + if ( ! Utilities::FileExists( fname ) ) { @@ -54,6 +59,12 @@ int main(int argc, char **argv) f.open(fname.c_str()); std::string pname; f >> pname; + while(pname[0] == '#') + { + getline(f, pname, '\n'); + f >> pname; + } + f.close(); @@ -70,7 +81,7 @@ int main(int argc, char **argv) command += "\""; #endif command += " " + pname + " -q"; - + std::cout << "executing '" << command << "'" << std::endl; if ( system ( command.c_str() ) ) { std::cout << "An error occured while running '" @@ -91,7 +102,7 @@ if ( system ( command.c_str() ) ) command += "\""; #endif command += " -q"; - + std::cout << "executing '" << command << "'" << std::endl; if ( ! system ( command.c_str() ) ) { std::cout << "Package '"