2023-02-02 17:05:33 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# A wrapper for the arkenfox-updater that runs it on all pre-existing Arkenfox
|
|
|
|
# user.js files on the machine.
|
|
|
|
|
|
|
|
# On installation of LARBS, this file is copied to /usr/local/lib/ where it is
|
|
|
|
# run by a pacman hook set up. The user should not have to run this manually.
|
|
|
|
|
|
|
|
# Search for all Firefox and Librewolf profiles using Arkenfox.
|
2023-02-02 19:15:32 +00:00
|
|
|
profiles="$(grep -sH "arkenfox user.js" \
|
2023-02-02 17:05:33 +00:00
|
|
|
/home/*/.librewolf/*.default-release/user.js \
|
|
|
|
/home/*/.mozilla/firefox/*.default-release/user.js)"
|
|
|
|
|
|
|
|
IFS='
|
|
|
|
'
|
|
|
|
|
|
|
|
# Update each found profile.
|
|
|
|
for profile in $profiles; do
|
2023-08-18 12:20:05 +00:00
|
|
|
userjs=${profile%%/user.js*}
|
|
|
|
user=$(stat -c '%U' "$userjs") || continue
|
|
|
|
|
|
|
|
su -l "$user" -c "arkenfox-updater -c -p $userjs -s"
|
2023-02-02 17:05:33 +00:00
|
|
|
done
|