You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.3 KiB

  1. #!/usr/bin/env bash
  2. #
  3. # This script assumes a linux environment
  4. echo "*** uMatrix.webext: Creating web store package"
  5. echo "*** uMatrix.webext: Copying files"
  6. DES=dist/build/uMatrix.webext
  7. rm -rf $DES
  8. mkdir -p $DES/webextension
  9. cp -R ./assets $DES/webextension/
  10. cp -R ./src/* $DES/webextension/
  11. cp platform/chromium/*.html $DES/webextension/
  12. cp platform/chromium/*.js $DES/webextension/js/
  13. cp -R platform/chromium/img/* $DES/webextension/img/
  14. cp LICENSE.txt $DES/webextension/
  15. cp platform/webext/background.html $DES/webextension/
  16. cp platform/webext/polyfill.js $DES/webextension/js/
  17. cp platform/webext/from-legacy.js $DES/webextension/js/
  18. cp platform/webext/manifest.json $DES/webextension/
  19. cp platform/webext/bootstrap.js $DES/
  20. cp platform/webext/chrome.manifest $DES/
  21. cp platform/webext/install.rdf $DES/
  22. mv $DES/webextension/img/icon_128.png $DES/icon.png
  23. echo "*** uMatrix.webext: Generating meta..."
  24. python tools/make-webext-meta.py $DES/
  25. if [ "$1" = all ]; then
  26. echo "*** uMatrix.webext: Creating package..."
  27. pushd $DES > /dev/null
  28. zip ../$(basename $DES).zip -qr *
  29. popd > /dev/null
  30. fi
  31. echo "*** uMatrix.webext: Package done."