generate-flatpak-script.sh 722 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env sh
  2. set -e
  3. dir="$(dirname "$(readlink -f "$0")")"
  4. pip_generator_url='https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/pip/flatpak-pip-generator'
  5. cd "$dir"
  6. python3 -m venv flatpak-env
  7. export PATH="$dir/flatpak-env/bin:$PATH"
  8. pip3 install -Ur requirements.flatpak.txt
  9. pip3 install -Ur ../../requirements.txt
  10. # Freeze requirements, ignore blacklisted packages
  11. pip3 freeze | grep -v six= | grep -v matrix-nio > flatpak-env-requirements.txt
  12. # Generate flatpak requirements
  13. pip3 install requirements-parser
  14. [ ! -f flatpak-pip-generator ] && wget "$pip_generator_url"
  15. python3 flatpak-pip-generator -r flatpak-env-requirements.txt -o flatpak-pip
  16. pip3 install PyYAML
  17. python3 collector.py