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.1 KiB

7 years ago
  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
  9. cp -R ./assets $DES/
  10. cp -R ./src/* $DES/
  11. cp platform/chromium/*.html $DES/
  12. cp platform/chromium/*.js $DES/js/
  13. cp -R platform/chromium/img/* $DES/img/
  14. cp LICENSE.txt $DES/
  15. cp platform/webext/options_ui.html $DES/
  16. rm $DES/js/options_ui.js
  17. cp platform/webext/polyfill.js $DES/js/
  18. cp platform/webext/vapi-cachestorage.js $DES/js/
  19. cp platform/webext/manifest.json $DES/
  20. # webext-specific
  21. rm $DES/options_ui.html
  22. rm $DES/options_ui.js
  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).xpi -qr *
  29. popd > /dev/null
  30. fi
  31. echo "*** uMatrix.webext: Package done."