summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-05-10 14:44:45 -0700
committerXiao Pan <gky44px1999@gmail.com>2024-05-10 14:44:45 -0700
commitc8f04cc878e0c89fae9e709bea57bd723c220121 (patch)
tree02df5237fd97323fa5cc307da14f6d4caa6cdd7e
parent6692c47255d3dfbdbe668f6ddcb8e5d7b6aa254c (diff)
upd consider clean studio firefox profile arkenfox backup dir
-rwxr-xr-xsh/upd11
1 files changed, 9 insertions, 2 deletions
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