Update example/plugins/clean_all.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Toby Chui
2025-11-28 07:12:14 +08:00
committed by GitHub
parent a1e4422a3c
commit 840db05536

View File

@@ -9,11 +9,15 @@ for dir in */; do
# Detect platform and set executable name # Detect platform and set executable name
platform=$(uname) platform=$(uname)
if [ "$platform" = "Linux" ]; then # Detect Windows environments (MINGW*, MSYS*, CYGWIN*)
exe_name="${dir%/}" case "$platform" in
else MINGW*|MSYS*|CYGWIN*)
exe_name="${dir%/}.exe" exe_name="${dir%/}.exe"
fi ;;
*)
exe_name="${dir%/}"
;;
esac
# Remove the executable # Remove the executable
if [ -f "$exe_name" ]; then if [ -f "$exe_name" ]; then