arkenfox-auto-update (691B)
1 #!/bin/sh 2 3 # A wrapper for the arkenfox-updater that runs it on all pre-existing Arkenfox 4 # user.js files on the machine. 5 6 # On installation of LARBS, this file is copied to /usr/local/lib/ where it is 7 # run by a pacman hook set up. The user should not have to run this manually. 8 9 # Search for all Firefox and Librewolf profiles using Arkenfox. 10 profiles="$(grep -sH "arkenfox user.js" \ 11 /home/*/.librewolf/*.default-release/user.js \ 12 /home/*/.mozilla/firefox/*.default-release/user.js)" 13 14 IFS=' 15 ' 16 17 # Update each found profile. 18 for profile in $profiles; do 19 userjs=${profile%%/user.js*} 20 user=$(stat -c '%U' "$userjs") || continue 21 22 su -l "$user" -c "arkenfox-updater -c -p $userjs -s" 23 done