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.

39 lines
1.4 KiB

  1. #!/usr/bin/env bash
  2. #
  3. # This script assumes a linux environment
  4. echo "*** uMatrix.webext-hybrid: Creating web store package"
  5. echo "*** uMatrix.webext-hybrid: Copying files"
  6. DES=dist/build/uMatrix.webext-hybrid
  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/vapi-cachestorage.js $DES/webextension/js/
  18. cp platform/webext/from-legacy.js $DES/webextension/js/
  19. cp platform/webext/manifest.json $DES/webextension/
  20. cp platform/webext/bootstrap.js $DES/
  21. cp platform/webext/chrome.manifest $DES/
  22. cp platform/webext/install.rdf $DES/
  23. mv $DES/webextension/img/icon_128.png $DES/icon.png
  24. echo "*** uMatrix.webext-hybrid: Generating meta..."
  25. python tools/make-webext-hybrid-meta.py $DES/
  26. if [ "$1" = all ]; then
  27. echo "*** uMatrix.webext-hybrid: Creating package..."
  28. pushd $DES > /dev/null
  29. zip ../$(basename $DES).xpi -qr *
  30. popd > /dev/null
  31. fi
  32. echo "*** uMatrix.webext-hybrid: Package done."