Making clean more robust, removing cleaning of .gen.bhl files

This commit is contained in:
Pavel Shevaev 2023-05-17 23:28:31 +03:00
parent 41cef1cea4
commit 06e42eb56f
1 changed files with 1 additions and 23 deletions

View File

@ -263,35 +263,13 @@ function bhl_handle_error_result(array $ret_out, $err_file, $exit = true)
function bhl_clean() function bhl_clean()
{ {
global $GAME_ROOT;
$files = scan_files_rec(array(config_base_dir()), array('js', 'gen.bhl'));
foreach($files as $file)
{
$is_conf = strpos($file, '.gen.bhl') === false;
if($is_conf)
{
//skipping .def.js files
if(strpos($file, '.def.js') !== false)
continue;
@touch($file);
}
else if(!$is_conf)
{
ensure_rm($file);
}
}
bhl_clean_cache(); bhl_clean_cache();
bhl_shell_ensure("clean"); bhl_shell_ensure("clean");
} }
function bhl_clean_cache() function bhl_clean_cache()
{ {
global $GAME_ROOT; ensure_rm(bhl_proj()->tmp_dir);
ensure_rm("$GAME_ROOT/build/bhl/");
} }
function bhl_show_position($line, $row, array $lines) function bhl_show_position($line, $row, array $lines)