Add cleantool.sh
This commit is contained in:
parent
709870a6bb
commit
3f94468d0b
1 changed files with 18 additions and 0 deletions
18
cleantool.sh
Executable file
18
cleantool.sh
Executable file
|
@ -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
|
Reference in a new issue