From 3f94468d0b1842d28a26485da52cd4fdaaba6783 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 11 Mar 2024 01:57:32 +0100 Subject: [PATCH] Add cleantool.sh --- cleantool.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 cleantool.sh diff --git a/cleantool.sh b/cleantool.sh new file mode 100755 index 0000000..522f52b --- /dev/null +++ b/cleantool.sh @@ -0,0 +1,18 @@ +#!/bin/bash +echo ":: Cleaning built files" +rm -rf linux-*.tar.sign linux-*.tar.xz linux-jstm-optimized-*.pkg.tar.zst linux-jstm-optimized-headers-*.pkg.tar.zst more-uarches-*.tar.gz patch-*.xz cl-linux pkg +function ask_cleansrc() { + read -rp "Clean src/ directory too [y/N]? " CLEANTOOL_SRC + case "${CLEANTOOL_SRC}" in + "y"|"Y") + rm -rf src + ;; + "n"|"N"|"") + ;; + *) + echo ":: Error: Invalid answer. Please answer with Y or N" + ask_cleansrc + ;; + esac +} +ask_cleansrc