From 913d9bf26b00ec5fc8afa266e97e3a9ff535f514 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 10 Dec 2024 22:27:35 -0500 Subject: [PATCH] fixed clean script --- scripts/clean.ps1 | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/scripts/clean.ps1 b/scripts/clean.ps1 index 1b7642b..76df3d8 100644 --- a/scripts/clean.ps1 +++ b/scripts/clean.ps1 @@ -1,10 +1,16 @@ -$path_root = git rev-parse --show-toplevel +$misc = Join-Path $PSScriptRoot 'helpers/misc.psm1' +Import-Module $misc + +$path_root = Get-ScriptRepoRoot $path_base = Join-Path $path_root base $path_base_build = Join-Path $path_base build -$path_singleheader = Join-Path $path_root singleheader +$path_segmented = Join-Path $path_root gen_segmented +$path_segmented_build = Join-Path $path_segmented build +$path_segmented_gen = Join-Path $path_segmented gen +$path_singleheader = Join-Path $path_root gen_singleheader $path_singleheader_build = Join-Path $path_singleheader build $path_singleheader_gen = Join-Path $path_singleheader gen -$path_unreal = Join-Path $paht_root unreal +$path_unreal = Join-Path $path_root gen_unreal_engine $path_unreal_build = Join-Path $path_unreal build $path_unreal_gen = Join-Path $path_unreal gen $path_test = Join-Path $path_root test @@ -13,30 +19,36 @@ $path_test_gen = Join-Path $path_test gen $path_x64 = Join-Path $path_root x64 $path_release = Join-Path $path_root release -if ( Test-Path $path_project_build) { - Remove-Item $path_project_build -Recurse +if ( Test-Path $path_base_build) { + Remove-Item $path_base_build -Recurse -Verbose } -if ( Test-Path $path_project_gen ) { - Remove-Item $path_project_gen -Recurse +if ( Test-Path $path_segmented_build) { + Remove-Item $path_segmented_build -Recurse -Verbose +} +if ( Test-Path $path_segmented_gen ) { + Remove-Item $path_segmented_gen -Recurse -Verbose } if ( Test-Path $path_singleheader_build) { - Remove-Item $path_singleheader_build -Recurse + Remove-Item $path_singleheader_build -Recurse -Verbose } if ( Test-Path $path_singleheader_gen ) { - Remove-Item $path_singleheader_gen -Recurse + Remove-Item $path_singleheader_gen -Recurse -Verbose } -if ( Test-Path $path_unreal ) { - Remove-Item $path_unreal_build -Recurse +if ( Test-Path $path_unreal_build ) { + Remove-Item $path_unreal_build -Recurse -Verbose +} +if ( Test-Path $path_unreal_gen ) { + Remove-Item $path_unreal_gen -Recurse -Verbose } if ( Test-Path $path_test_build ) { - Remove-Item $path_test_build -Recurse + Remove-Item $path_test_build -Recurse -Verbose } if ( Test-Path $path_test_gen ) { - Remove-Item $path_test_gen -Recurse + Remove-Item $path_test_gen -Recurse -Verbose } if ( Test-Path $path_x64) { - Remove-Item $path_x64 -Recurse + Remove-Item $path_x64 -Recurse -Verbose } if ( Test-Path $path_release ) { - Remove-Item $path_release -Recurse + Remove-Item $path_release -Recurse -Verbose }