File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ DOC_FILES=" ../README.md"
4+ IMG_FILES=" ../src/chrome/assets/logo.png"
5+
6+ # Strip subdirectories for manifest
7+ sed ' s/src\/.*\///g' ../manifest.json > temp-chrome-manifest.json
8+
9+ # Fix update url for Chrome manifest
10+ sed -i ' s/updates\.xml/src\/updates\/updates.xml/g' temp-chrome-manifest.json
11+
12+ # Strip subdirectories for background.js
13+ sed ' s/src\/.*\///g' ../src/js/background.js > temp-background.js
14+
15+ JS_FILES=" temp-background.js"
16+ GEN_FILES=" $JS_FILES $DOC_FILES $IMG_FILES "
17+ CH_FILES=" $GEN_FILES temp-chrome-manifest.json ../src/updates/updates.xml"
18+ FF_FILES=" $GEN_FILES temp-ff-manifest.json ../src/updates/updates.json ../src/chrome/assets/logo.png"
19+
20+ NAME=" output/fadblock"
21+
22+ # Remove existing files
23+ rm -f $NAME .crx $NAME .xpi
24+
25+ # Generate Chrome .crx extension package
26+ 7z a -tzip -mx9 $NAME .crx $CH_FILES
27+ 7z rn $NAME .crx temp-chrome-manifest.json manifest.json temp-background.js background.js
28+
29+ # Remove temp files
30+ echo " \nDeleting temp files..."
31+ rm -v temp-chrome-manifest.json temp-ff-manifest.json temp-background.js
You can’t perform that action at this time.
0 commit comments