From c8f04cc878e0c89fae9e709bea57bd723c220121 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Fri, 10 May 2024 14:44:45 -0700 Subject: upd consider clean studio firefox profile arkenfox backup dir --- sh/upd | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sh') diff --git a/sh/upd b/sh/upd index 693f323..f3838de 100755 --- a/sh/upd +++ b/sh/upd @@ -90,10 +90,17 @@ clean () { fi - if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then - cd "$HOME/.mozilla/firefox/xxxxxxxx.fly/prefsjs_backups" || exit + if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ] || [ "$hostname" = xyzstudio ]; then + case "$hostname" in + xyzstudio) profile_dir="$HOME/.mozilla/firefox/dyafk";; + *) profile_dir="$HOME/.mozilla/firefox/xxxxxxxx.fly";; + esac + cd "$profile_dir/prefsjs_backups" || exit # https://stackoverflow.com/a/34862475/9008720 ls -t | tail -n +11 | tr '\n' '\0' | xargs -0 rm -- + fi + + if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then # https://unix.stackexchange.com/questions/92095/reset-atq-list-to-zero sudo systemctl stop atd echo 0 | sudo tee /var/spool/atd/.SEQ > /dev/null -- cgit v1.2.3-70-g09d2