#!/bin/bash

rm -rf dist
mkdir -p dist/chrome dist/firefox

cp -r css fonts img js LICENSE manifest.json *.html dist/chrome
sed -i '' '/  "applications": {/,/  },/d' dist/chrome/manifest.json
sed -i '' 's/ data-no-firefox//' dist/chrome/*.html
pushd dist/chrome; zip -r ../chrome.zip *; popd

cp -r css fonts img js LICENSE manifest.json *.html dist/firefox
rm dist/firefox/js/ga.js
sed -i '' '/"author"/d' dist/firefox/manifest.json
sed -i '' '/"minimum_chrome_version"/d' dist/firefox/manifest.json
sed -i '' 's/, "js\/ga.js"//' dist/firefox/manifest.json
sed -i '' '/ data-no-firefox/d' dist/firefox/*.html

pushd dist/firefox; zip -r ../firefox.xpi *; popd

#!/bin/bash

rm -rf dist
mkdir -p dist/chrome dist/firefox

cp -r css fonts img js LICENSE manifest.json *.html dist/chrome
sed -i '' '/  "applications": {/,/  },/d' dist/chrome/manifest.json
sed -i '' 's/ data-no-firefox//' dist/chrome/*.html
pushd dist/chrome; zip -r ../chrome.zip *; popd

cp -r css fonts img js LICENSE manifest.json *.html dist/firefox
rm dist/firefox/js/ga.js
sed -i '' '/"author"/d' dist/firefox/manifest.json
sed -i '' '/"minimum_chrome_version"/d' dist/firefox/manifest.json
sed -i '' '/"content_security_policy"/d' dist/firefox/manifest.json
sed -i '' 's/, "js\/ga.js"//' dist/firefox/manifest.json
sed -i '' '/ data-no-firefox/d' dist/firefox/*.html

pushd dist/firefox; zip -r ../firefox.xpi *; popd

Fix Firefox warning for content_security_policy
Fix Firefox warning for content_security_policy
