Update clean.sh

tweak
This commit is contained in:
tteckster 2023-01-29 15:20:01 -05:00 committed by GitHub
parent c9e3b72dfa
commit 6b3d7a7bf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 33 deletions

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash
function header_info {
function header_info() {
cat <<"EOF"
________ __ _ ________
/ ____/ /__ ____ _____ / / | |/ / ____/
@ -9,13 +10,17 @@ function header_info {
EOF
}
BL=$(echo "\033[36m")
GN=$(echo "\033[1;92m")
CL=$(echo "\033[m")
name=$(hostname)
clear
header_info
echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n"
# Clean cache
cache=$(find /var/cache/ -type f)
if [[ -z "$cache" ]]; then
echo -e "It appears there are no cached files on your system. \n"
@ -32,6 +37,8 @@ cache=$(find /var/cache/ -type f)
sleep 2
fi
fi
# Clean logs
clear
header_info
echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n"
@ -51,6 +58,8 @@ logs=$(find /var/log/ -type f)
sleep 2
fi
fi
# Populate apt lists
clear
header_info
echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n"