mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-12-19 13:57:00 +01:00
Create clean_all.sh
This commit is contained in:
29
example/plugins/clean_all.sh
Normal file
29
example/plugins/clean_all.sh
Normal file
@@ -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."
|
||||||
Reference in New Issue
Block a user