From f94b4d2742cc31eb738f25c6956b9cda31f5f449 Mon Sep 17 00:00:00 2001 From: Toby Chui Date: Thu, 20 Nov 2025 20:18:48 +0800 Subject: [PATCH] Create clean_all.sh --- example/plugins/clean_all.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 example/plugins/clean_all.sh diff --git a/example/plugins/clean_all.sh b/example/plugins/clean_all.sh new file mode 100644 index 0000000..b5c7acb --- /dev/null +++ b/example/plugins/clean_all.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# This script cleans all the built binaries from the plugins + +echo "Cleaning all plugin builds" +for dir in */; do + if [ -d "$dir" ]; then + echo "Cleaning directory: $dir" + cd "$dir" + + # Detect platform and set executable name + platform=$(uname) + if [ "$platform" = "Linux" ]; then + exe_name="${dir%/}" + else + exe_name="${dir%/}.exe" + fi + + # Remove the executable + if [ -f "$exe_name" ]; then + echo "Removing $exe_name" + rm "$exe_name" + fi + + # Return to the parent directory + cd .. + fi +done + +echo "Clean process completed for all directories."