From b419a4cf57768a75c85a57722f423d6d7c5ee62c Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Fri, 17 Jan 2025 16:37:35 +0100 Subject: [PATCH] build.sh: Add an option to clean build dirs --- build.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build.sh b/build.sh index 3ab4ac55d..e97690827 100755 --- a/build.sh +++ b/build.sh @@ -24,6 +24,16 @@ command_four() { exit 0 } +command_five() { + OUTDIR="$(pwd)/out" + MODULES_OUTDIR="$(pwd)/modules_out" + TMPDIR="$(pwd)/kernel_build/tmp" + rm -rf "$TMPDIR" + rm -rf "$MODULES_OUTDIR" + rm -rf "$OUTDIR" + exit 0 +} + # Main loop while true; do echo "" @@ -32,6 +42,7 @@ while true; do echo "2: Build FireAsf kernel with KernelSU" echo "3: Setup KernelSU Next (run before 2)" echo "4: Regenerate defconfigs" + echo "5: Clean build dirs" echo "Type 'exit' to guess what? Exit, yeah exit!" read -p "Make a good choice: " choice @@ -48,6 +59,9 @@ while true; do 4) command_four ;; + 5) + command_five + ;; exit) echo "Exiting the program. Goodbye!" break