From 7dd12964856f9e1d0b444a2c9d8b3e48d152305f Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 1 Feb 2023 09:27:45 -0500 Subject: [PATCH] get newest extension versions automatically --- static/larbs.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/static/larbs.sh b/static/larbs.sh index cc8bc36..e80ea58 100644 --- a/static/larbs.sh +++ b/static/larbs.sh @@ -212,14 +212,15 @@ makeuserjs(){ } installffaddons(){ + addonlist="ublock-origin decentraleyes istilldontcareaboutcookies vim-vixen" addontmp="$(mktemp -d)" trap "rm -fr $addontmp" HUP INT QUIT TERM PWR EXIT - IFS=' -' + IFS=' ' sudo -u "$name" mkdir -p "$pdir/extensions/" for addon in $addonlist; do - file="${addon##*/}" - sudo -u "$name" curl -LOs "$addon" > "$addontmp/$file" + addonurl="$(curl --silent "https://addons.mozilla.org/en-US/firefox/addon/${addon}/" | grep -o 'https://addons.mozilla.org/firefox/downloads/file/[^"]*')" + file="${addonurl##*/}" + sudo -u "$name" curl -LOs "$addonurl" > "$addontmp/$file" id="$(unzip -p "$file" manifest.json | grep "\"id\"")" id="${id%\"*}" id="${id##*\"}" @@ -335,11 +336,6 @@ EndSection' >/etc/X11/xorg.conf.d/40-libinput.conf whiptail --infobox "Setting browser privacy settings and add-ons..." 7 60 -addonlist="https://addons.mozilla.org/firefox/downloads/file/3929378/ublock_origin-1.42.0-an+fx.xpi -https://addons.mozilla.org/firefox/downloads/file/3902154/decentraleyes-2.0.17.xpi -https://addons.mozilla.org/firefox/downloads/file/4035245/istilldontcareaboutcookies-1.1.0.xpi -https://addons.mozilla.org/firefox/downloads/file/3845233/vim_vixen-1.2.3-an+fx.xpi" - browserdir="/home/$name/.librewolf" profilesini="$browserdir/profiles.ini"