]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix copy of files for bin/app-template/doc
authorCamille GOUTTEBROZE <camille.gouttebroze@cea.fr>
Mon, 29 Sep 2014 10:09:07 +0000 (12:09 +0200)
committerCamille GOUTTEBROZE <camille.gouttebroze@cea.fr>
Mon, 29 Sep 2014 10:09:07 +0000 (12:09 +0200)
bin/app-quickstart.py

index ab61a30979ef792bb4e8cc7075e2905318925c19..8dd7d696ef272ceadb6a2350c2d11cf7cb5c31c9 100755 (executable)
@@ -67,10 +67,11 @@ def profileReplaceStrings( src, dst, options ) :
     with open( dst, "wt" ) as fout:
         with open( src, "rt" ) as fin:
             for line in fin:
-                fout.write( line.replace( '[LIST_OF_MODULES]', options.modules )/
-                                .replace( '[NAME_OF_APPLICATION]', options.name.upper() )/
-                                .replace( '<Name_of_Application>', options.name )/
-                                .replace( '(name_of_application)', options.name.lower() ) )
+                l = line.replace( '[LIST_OF_MODULES]', options.modules )
+                l = l.replace( '[NAME_OF_APPLICATION]', options.name.upper()
+                l = l.replace( '<Name_of_Application>', options.name )
+                l = l.replace( '(name_of_application)', options.name.lower()
+                fout.write( l )
 
 #Generation of a template profile sources
 def profileGenerateSources( options, args ) :
@@ -78,7 +79,6 @@ def profileGenerateSources( options, args ) :
     #Set name of several directories
     app_dir = os.path.join( options.prefix, options.name )
     src_dir = os.path.join( app_dir, "src" )
-    resources_dir = os.path.join( app_dir, "resources" )
     kernek_root_dir = os.environ["KERNEL_ROOT_DIR"]
     bin_dir = os.path.join( kernek_root_dir, "bin", "salome" )
     template_dir = os.path.join( bin_dir, "app-template"  )
@@ -100,9 +100,11 @@ def profileGenerateSources( options, args ) :
         shutil.copy( os.path.join( bin_dir, f ), src_dir )
 
     #Adapt source directory
-    profileReplaceStrings( os.path.join( template_dir, "resources", "SalomeApp.xml.in" ), os.path.join( resources_dir, "SalomeApp.xml.in" ), options )
-    profileReplaceStrings( os.path.join( template_dir, "resources", "CMakeLists.txt" ), os.path.join( resources_dir, "CMakeLists.txt" ), options )
+    profileReplaceStrings( os.path.join( template_dir, "resources", "SalomeApp.xml.in" ), os.path.join( os.path.join( app_dir, "resources" ), "SalomeApp.xml.in" ), options )
+    profileReplaceStrings( os.path.join( template_dir, "resources", "CMakeLists.txt" ), os.path.join( os.path.join( app_dir, "resources" ), "CMakeLists.txt" ), options )
     profileReplaceStrings( os.path.join( template_dir, "CMakeLists.txt" ), os.path.join( app_dir, "CMakeLists.txt" ), options )
+    profileReplaceStrings( os.path.join( template_dir, "doc", "index.rst" ), os.path.join( os.path.join( app_dir, "doc" ), "index.rst" ), options )
+    profileReplaceStrings( os.path.join( template_dir, "doc", "conf.py.in" ), os.path.join( os.path.join( app_dir, "doc" ), "conf.py.in" ), options )
 
 # -----------------------------------------------------------------------------