summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-rwxr-xr-xsh/upd27
1 files changed, 6 insertions, 21 deletions
diff --git a/sh/upd b/sh/upd
index e50e32f..e3e70b1 100755
--- a/sh/upd
+++ b/sh/upd
@@ -8,7 +8,7 @@ all () {
qb
fi
[ "$hostname" = xyzinsp ] && music
- if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ] || [ "$hostname" = xyzstudio ]; then
+ if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then
userjs
fi
}
@@ -90,19 +90,12 @@ clean () {
fi
- 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
+ if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then
+ cd "$HOME/.mozilla/firefox/xxxxxxxx.fly/prefsjs_backups" || exit
# https://stackoverflow.com/a/34862475/9008720
ls -t | tail -n +11 | tr '\n' '\0' | xargs -0 rm --
- cd "$profile_dir/userjs_backups" || exit
+ cd "$HOME/.mozilla/firefox/xxxxxxxx.fly/userjs_backups" || exit
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
@@ -126,20 +119,12 @@ fast () {
}
userjs () {
- case "$hostname" in
- xyzstudio)
- profile_dir="$HOME/.mozilla/firefox/dyafk"
- sudo systemctl stop dyafk@xyz
- ;;
- *) profile_dir="$HOME/.mozilla/firefox/xxxxxxxx.fly";;
- esac
kill $(pidof "$BROWSER")
# change working dir for cleaner
- cd "$profile_dir" || exit
+ cd "$HOME/.mozilla/firefox/xxxxxxxx.fly" || exit
arkenfox-cleaner -s
# when multiple firefox profiles, it will prompt me to choose, which breaks automation, so I explicitly specify one profile
- arkenfox-updater -s -p "$profile_dir"
- [ "$hostname" = xyzstudio ] && sudo systemctl start dyafk@xyz
+ arkenfox-updater -s -p "$HOME/.mozilla/firefox/xxxxxxxx.fly"
}
misc () {