bin/clean: replace broken aptclean alias

This commit is contained in:
xeruf 2022-02-10 16:02:30 +01:00
parent 8b48a11960
commit 84ebcd794a
1 changed files with 5 additions and 3 deletions

View File

@ -31,8 +31,8 @@ done
highlight "s :: recursively remove logs"
[[ $1 =~ "s" ]] && find \( -name ".git" -o -name "src" -o -name "pkg" \) -prune -o \
\( \( -name "logs" -o -name "log" -o -name "crash-reports" \) -prune -o \
-type f \( -name "*.log.gz" -o -name "*.log.[0-9]" -o -iname "*.log" \) \) \
\( \( -name "logs" -o -name "log" -o -name "crash-reports" -o -name ".auctex-auto" \) -prune -o \
-type f \( -name "*.log.gz" -o -name "*.log.[0-9]" -o -iname "*.log" -o -name "*.tuc" \) \) \
-print -exec rm -rI {} +
highlight "m :: recursively remove mac-files"
@ -66,7 +66,9 @@ highlight "c :: clean electron caches"
if test -f "/var/log/apt/history.log"; then
aptclean_cur=$(cat "/var/log/apt/history.log" | wc -l)
test "$aptclean_cur" -gt "${aptclean_last:--1}" && aptclean && echo "Cleaned apt"
test "$aptclean_cur" -gt "${aptclean_last:--1}" &&
sudo apt-get clean && sudo apt-get autoremove &&
echo "Cleaned apt"
export aptclean_last=$aptclean_cur
fi