aboutsummaryrefslogtreecommitdiff
path: root/run-tools.sh
diff options
context:
space:
mode:
authorWeicao-CatilGrass <1992414357@qq.com>2026-05-16 16:01:19 +0800
committerWeicao-CatilGrass <1992414357@qq.com>2026-05-16 16:01:19 +0800
commit2f4adb93d3259cf1d64d9ecf24f96a5cf2fd2e28 (patch)
treeda8e238c59c324c08b3e75aa9105da4556f573e1 /run-tools.sh
parent8366dce292eba95f38f9f79a038d974270b547e2 (diff)
Add support for Python scripts in run-tools
Diffstat (limited to 'run-tools.sh')
-rwxr-xr-xrun-tools.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/run-tools.sh b/run-tools.sh
index 8faf80f..7a1062a 100755
--- a/run-tools.sh
+++ b/run-tools.sh
@@ -10,6 +10,11 @@ if [ $# -eq 0 ]; then
basename "$file" .sh
fi
done
+ for file in dev_tools/scripts/*.py; do
+ if [ -f "$file" ]; then
+ basename "$file" .py
+ fi
+ done
fi
if [ -d "dev_tools/src/bin" ]; then
for file in dev_tools/src/bin/*.rs; do
@@ -23,11 +28,14 @@ fi
target_bin="$1"
target_script="dev_tools/scripts/${target_bin}.sh"
+target_python="dev_tools/scripts/${target_bin}.py"
target_file="dev_tools/src/bin/${target_bin}.rs"
if [ -f "$target_script" ]; then
chmod +x "$target_script"
"$target_script"
+elif [ -f "$target_python" ]; then
+ python "$target_python"
elif [ -f "$target_file" ]; then
cargo run --manifest-path dev_tools/Cargo.toml --bin "$1" --quiet
else