Skip to content

Commit

Permalink
.make#install: build Firefox addons for manual installation by user
Browse files Browse the repository at this point in the history
  • Loading branch information
XPhyro committed Jan 19, 2024
1 parent 7b35332 commit 8798fd2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/.make
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,23 @@ install() {
' -- >> ../src/.installed
rsync -abiPq -- ./ "$dataprefix/"
)

(
cd js

printf "\n%s\n" \
"Building Firefox addons:"

(
cd firefox
find '.' -mindepth 1 -maxdepth 1 -type d -not -name "build" -printf "%P\n" | while IFS= read -r addon; do
cd "$addon"
printf " %s -> %s\n" "$addon" "$rootdir/src/js/firefox/build/$addon-$(jq .version < manifest.json | sed 's/^"//;s/"$//').zip"
web-ext --no-input --artifacts-dir=../build \
build --overwrite-dest > /dev/null
done
)
)
}

uninstall() {
Expand Down Expand Up @@ -490,7 +507,8 @@ clean() {

(
cd js || exit 1
find '.' -mindepth 1 -type d -name "web-ext-artifacts" -print0 | xargs -r0 rm -rf --
cd firefox || exit 1
rm -rf -- build/
)
}

Expand Down
1 change: 1 addition & 0 deletions src/js/firefox/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
web-ext-artifacts/
build/

0 comments on commit 8798fd2

Please sign in to comment.