bin/clean: replace broken aptclean alias
This commit is contained in:
parent
8b48a11960
commit
84ebcd794a
|
@ -31,8 +31,8 @@ done
|
||||||
|
|
||||||
highlight "s :: recursively remove logs"
|
highlight "s :: recursively remove logs"
|
||||||
[[ $1 =~ "s" ]] && find \( -name ".git" -o -name "src" -o -name "pkg" \) -prune -o \
|
[[ $1 =~ "s" ]] && find \( -name ".git" -o -name "src" -o -name "pkg" \) -prune -o \
|
||||||
\( \( -name "logs" -o -name "log" -o -name "crash-reports" \) -prune -o \
|
\( \( -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" \) \) \
|
-type f \( -name "*.log.gz" -o -name "*.log.[0-9]" -o -iname "*.log" -o -name "*.tuc" \) \) \
|
||||||
-print -exec rm -rI {} +
|
-print -exec rm -rI {} +
|
||||||
|
|
||||||
highlight "m :: recursively remove mac-files"
|
highlight "m :: recursively remove mac-files"
|
||||||
|
@ -66,7 +66,9 @@ highlight "c :: clean electron caches"
|
||||||
|
|
||||||
if test -f "/var/log/apt/history.log"; then
|
if test -f "/var/log/apt/history.log"; then
|
||||||
aptclean_cur=$(cat "/var/log/apt/history.log" | wc -l)
|
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
|
export aptclean_last=$aptclean_cur
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue