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

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