diff --git a/app.rb b/app.rb index be51f10..9bafe6f 100644 --- a/app.rb +++ b/app.rb @@ -552,6 +552,9 @@ end get "/gitbld/:id/:git_id" do end +get "/prjcfg/:id" do +end + not_found do status 404 @page_name = "Кто-то потерялся" diff --git a/classes/projects.rb b/classes/projects.rb index 1318fb0..3e9fc15 100644 --- a/classes/projects.rb +++ b/classes/projects.rb @@ -84,7 +84,20 @@ class ProjectsActions end if File.exist?(configuration) conf_path = File.join(fname, PROJECTS_STRUCTURE[:CONFIGS], "#{project_name}.cfg") - FileUtils.cp(configuration, conf_path) + proj_config = <<~PRJ_CFG + include("#{configuration}") + config_opts['plugin_conf']['ccache_enable'] = True + config_opts['plugin_conf']['ccache_opts']['max_cache_size'] = '4G' + config_opts['plugin_conf']['ccache_opts']['hashdir'] = True + config_opts['plugin_conf']['ccache_opts']['debug'] = False + config_opts['plugin_conf']['ccache_opts']['show_stats'] = True + config_opts['plugin_conf']['package_state_enable'] = True + config_opts['plugin_conf']['procenv_enable'] = True + config_opts['plugin_conf']['root_cache_enable'] = True + config_opts['plugin_conf']['showrc_enable'] = True + config_opts['plugin_conf']['yum_cache_enable'] = True + PRJ_CFG + File.open(conf_path, "w") { |f| f << proj_config } @error = @db.proj_create(project_name, description) if @error.nil? created = true