jstm-optimized/cleantool.sh

33 lines
736 B
Bash
Raw Normal View History

2024-03-11 01:57:32 +01:00
#!/bin/bash
echo ":: Cleaning built files"
[[ ! -d "kernel" ]] && exit
cd kernel
rm -rf linux-*.tar.xz \
linux-*.tar.sign \
linux-jstm-optimized-*.pkg.tar.zst \
linux-jstm-optimized-headers-*.pkg.tar.zst \
more-uarches-*.tar.gz \
patch-*.xz \
cl-linux \
pkg
[[ -d "src" ]] && (
while true; do
read -rp ":: Clean src/ directory too [y/N]? " CLEANTOOL_SRC
case "${CLEANTOOL_SRC}" in
"y"|"Y")
rm -rf src
break
;;
"n"|"N"|"")
break
;;
*)
echo ":: Error: Invalid answer. Please answer with Y or N"
;;
esac
done
)