From a0a3e42e6a511550ca58a31226a490cb167b0bbe Mon Sep 17 00:00:00 2001 From: Ed_ Date: Thu, 30 Mar 2023 19:33:46 -0400 Subject: [PATCH] Various updates to scripts --- scripts/build.ps1 | 8 +++++--- scripts/clean.ps1 | 5 ++++- scripts/refactor_and_format.ps1 | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 6b00006..9292787 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -1,6 +1,6 @@ -if ($PSVersionTable.PSEdition -ne "Core") +if ($Host.UI.RawUI -and $Host.UI.RawUI.CursorPosition) { - $Host.UI.RawUI.CursorPosition = @{X=0; Y=0} + cls } @@ -80,6 +80,8 @@ if ( $test -eq $true ) $args_ninja += "-C" $args_ninja += $path_test_build - Start-Process ninja $args_ninja -Wait -NoNewWindow -WorkingDirectory $path_test + write-host $args_ninja + + Start-Process ninja $args_ninja -Wait -NoNewWindow -WorkingDirectory $path_root #endregion Test Build } diff --git a/scripts/clean.ps1 b/scripts/clean.ps1 index 365ca97..40de8c7 100644 --- a/scripts/clean.ps1 +++ b/scripts/clean.ps1 @@ -18,4 +18,7 @@ if ( Test-Path $path_test_build ) $files = Get-ChildItem -Recurse -Path $path_test -Include $include -Exclude $exclude -Remove-Item $files +if ( $files ) +{ + Remove-Item $files +} diff --git a/scripts/refactor_and_format.ps1 b/scripts/refactor_and_format.ps1 index c6465d2..9ff9488 100644 --- a/scripts/refactor_and_format.ps1 +++ b/scripts/refactor_and_format.ps1 @@ -46,7 +46,7 @@ if ( $false ){ } else { $refactorParams = @( - "-debug", + # "-debug", "-num=$($targetFiles.Count)" "-src=$($targetFiles)", "-dst=$($refactoredFiles)", @@ -86,7 +86,7 @@ foreach ( $file in $targetFiles ) } $refactorParams = @( - "-debug", + # "-debug", "-num=$($targetFiles.Count)" "-src=$($targetFiles)", "-dst=$($refactoredFiles)",