aboutsummaryrefslogtreecommitdiff
path: root/run-tools.ps1
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-07-10 16:54:57 +0800
committer魏曹先生 <1992414357@qq.com>2026-07-10 16:54:57 +0800
commit5d258482fb84d58c966a7ccc1b467708278d28ad (patch)
tree1a0c9d2e245d43ff7bc11d9088cf88a5264d293f /run-tools.ps1
parenta8c8d50b6c59b103da7fd4bbb5e7ca3ff7b2f49a (diff)
refactor(devtools): rename dev_tools to .run and replace run-tools
scripts Replace the old run-tools.ps1/run-tools.sh scripts with a new unified run.ps1/run.sh launcher that supports multiple languages (PowerShell, Rust, Python, Go, C#, Nim, Perl, Ruby, Zig, and arbitrary binaries) from the `.run/src/bin` directory. Move all development tools from `dev_tools/` to `.run/`, update Cargo workspace config and relevant documentation references.
Diffstat (limited to 'run-tools.ps1')
-rw-r--r--run-tools.ps160
1 files changed, 0 insertions, 60 deletions
diff --git a/run-tools.ps1 b/run-tools.ps1
deleted file mode 100644
index 7aa2c9c..0000000
--- a/run-tools.ps1
+++ /dev/null
@@ -1,60 +0,0 @@
-Set-Location -Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ErrorAction Stop
-
-# Collect all available tool names
-$tools = @()
-
-if (Test-Path "dev_tools/scripts") {
- $scripts = Get-ChildItem -Path "dev_tools/scripts/*.ps1", "dev_tools/scripts/*.py"
- foreach ($script in $scripts) {
- if ($script -is [System.IO.FileInfo]) {
- $tools += $script.BaseName
- }
- }
-}
-if (Test-Path "dev_tools/src/bin") {
- $files = Get-ChildItem -Path "dev_tools/src/bin/*.rs"
- foreach ($file in $files) {
- if ($file -is [System.IO.FileInfo]) {
- $tools += $file.BaseName
- }
- }
-}
-
-if ($args.Count -eq 0) {
- Write-Host "Available:"
- for ($i = 0; $i -lt $tools.Count; $i++) {
- Write-Host (" [{0,2}] {1}" -f ($i + 1), $tools[$i])
- }
- exit 1
-}
-
-$target_name = $args[0]
-
-# Check if input is a number
-if ($target_name -match '^\d+$') {
- $idx = [int]$target_name - 1
- if ($idx -ge 0 -and $idx -lt $tools.Count) {
- $target_name = $tools[$idx]
- } else {
- Write-Host "Error: invalid number '$target_name', valid range is 1-$($tools.Count)"
- exit 1
- }
-}
-
-# Collect remaining arguments to pass to the script
-$script_args = $args[1..$args.Count]
-
-$script_file_ps1 = "dev_tools/scripts/${target_name}.ps1"
-$script_file_py = "dev_tools/scripts/${target_name}.py"
-$rust_file = "dev_tools/src/bin/${target_name}.rs"
-
-if (Test-Path $script_file_ps1) {
- & $script_file_ps1 $script_args
-} elseif (Test-Path $script_file_py) {
- python $script_file_py $script_args
-} elseif (Test-Path $rust_file) {
- cargo run --manifest-path dev_tools/Cargo.toml --bin $target_name --quiet -- $script_args
-} else {
- Write-Host "Error: target '$target_name' does not exist as a script or Rust program"
- exit 1
-}