From 279cd213e980bc40dbbbed1d7f51154e152eee79 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Sat, 14 Jan 2023 11:03:11 +0000 Subject: [PATCH] Update file run_onchange_after_40-firefox.tmpl --- .../universal/run_onchange_after_40-firefox.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.tmpl index fc223207..9237f82a 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_40-firefox.tmpl @@ -41,9 +41,9 @@ if command -v org.mozilla.firefox > /dev/null; then curl --silent "https://addons.mozilla.org/en-US/firefox/addon/$FIREFOX_PLUGIN/" > "$PLUGIN_HTML" PLUGIN_TMP="$(mktemp)" cat "$PLUGIN_HTML" | htmlq '#redux-store-state' | sed 's/^//' | sed 's/<\/script>$//' > "$PLUGIN_TMP" - PLUGIN_ID="$(jq '.addons.bySlug.'"$FIREFOX_PLUGIN" "$PLUGIN_TMP")" + PLUGIN_ID="$(jq '.addons.bySlug["'"$FIREFOX_PLUGIN"'"]' "$PLUGIN_TMP")" if [ "$PLUGIN_ID" != 'null' ]; then - PLUGIN_FILE_ID="$(jq '.addons.byID["'"$PLUGIN_ID"'"].guid' "$PLUGIN_TMP")" + PLUGIN_FILE_ID="$(jq -r '.addons.byID["'"$PLUGIN_ID"'"].guid' "$PLUGIN_TMP")" if [ "$PLUGIN_FILE_ID" != 'null' ]; then PLUGIN_URL="$(cat "$PLUGIN_HTML" | htmlq '.InstallButtonWrapper-download-link' --attribute href)" PLUGIN_FILENAME="${PLUGIN_FILE_ID}.xpi"