diff options
author | jahoti <jahoti@tilde.team> | 2021-09-28 00:00:00 +0000 |
---|---|---|
committer | jahoti <jahoti@tilde.team> | 2021-09-28 00:00:00 +0000 |
commit | fbf0503fe362df07eb34c4bd69d1b945f60922b4 (patch) | |
tree | 7c5395f4bd7af888fbb2a0c2b19da8f20a4cc61d /lib_build.sh | |
parent | df07adb296399dc0bae2117252f865a1069b851f (diff) | |
download | browser-extension-fbf0503fe362df07eb34c4bd69d1b945f60922b4.tar.gz browser-extension-fbf0503fe362df07eb34c4bd69d1b945f60922b4.zip |
Support building CRXs
Chromium now builds CRXs rather than ZIPs when given a key.
Diffstat (limited to 'lib_build.sh')
-rwxr-xr-x | lib_build.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib_build.sh b/lib_build.sh index 0fa656c..7327d52 100755 --- a/lib_build.sh +++ b/lib_build.sh @@ -292,6 +292,11 @@ EOF } make_zip() ( - cd "$BUILDDIR" - ${HAKETILO_ZIP:-zip -r} build.zip *;; + cd "$PACKDIR" + if [ "x$KEY" = x ]; then + ${HAKETILO_ZIP:-zip -r} build.zip *; + else + ${HAKETILO_CHROMIUM:-chromium} --pack-extension="$(realpath inner)" --pack-extension-key="$KEY" + mv *.crx build.zip + fi ) |