2020-03-26 07:27:40 +11:00
|
|
|
#!/usr/bin/env bash
|
2020-03-25 19:04:56 +11:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-03-26 07:27:40 +11:00
|
|
|
DIR="$(dirname "$(readlink -f "$0")")"
|
2020-03-25 19:04:56 +11:00
|
|
|
|
2020-03-26 07:27:40 +11:00
|
|
|
cd "$DIR"
|
2020-03-25 19:04:56 +11:00
|
|
|
|
|
|
|
python3 -m venv flatpak-env
|
2020-03-26 07:27:40 +11:00
|
|
|
export PATH="$DIR/flatpak-env/bin:$PATH"
|
|
|
|
|
|
|
|
if [ ! -f flatpak-pip-generator ]; then
|
|
|
|
wget https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/pip/flatpak-pip-generator
|
|
|
|
fi
|
2020-03-25 19:04:56 +11:00
|
|
|
|
|
|
|
cat requirements.flatpak.txt ../../requirements.txt > requirements.txt
|
|
|
|
|
|
|
|
flatpak-env/bin/pip install -Ur requirements.txt
|
|
|
|
|
|
|
|
# freeze requirements and ignore blacklisted packages
|
2020-03-26 22:44:02 +11:00
|
|
|
flatpak-env/bin/pip freeze | \
|
|
|
|
grep -v PyYAML | grep -v six= | \
|
|
|
|
grep -v matrix-nio > flatpak-requirements.txt
|
2020-03-25 19:04:56 +11:00
|
|
|
|
|
|
|
# generate flatpak requirements
|
2020-03-26 07:27:40 +11:00
|
|
|
flatpak-env/bin/python flatpak-pip-generator --output flatpak-pip \
|
|
|
|
--requirements-file=flatpak-requirements.txt
|
2020-03-25 19:04:56 +11:00
|
|
|
|
|
|
|
flatpak-env/bin/pip install PyYAML
|
|
|
|
python collector.py
|