Install single-file, pip, readability as background tasks.

This commit is contained in:
Roland 2022-12-28 19:54:40 -07:00
parent 1d4f61c7bd
commit a9560992c5
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -16,17 +16,20 @@ apt install -y apt-transport-https ca-certificates curl gnupg-agent gcc libpq-de
# Install Archiving tools.
SF_VERSION="1.0.15"
if [ "$(single-file --version)" != "${SF_VERSION}" ]; then
sudo npm i -g single-file-cli@1.0.15 & # Install in background.
sudo npm i -g single-file-cli@${SF_VERSION} & # Install in background.
fi
readability-extractor --version || npm install -g 'git+https://github.com/pirate/readability-extractor'
readability-extractor --version || npm install -g 'git+https://github.com/pirate/readability-extractor' &
# Setup the virtual environment that main.py expects
pip3 --version || (
# If no pip, install pip
curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py &&
python3 /tmp/get-pip.py
python3 /tmp/get-pip.py &
)
# Wait for single-file, readability, pip3.
wait $(jobs -p)
# Build React app in background job.
[[ ! -f /usr/local/bin/serve || ! -f /usr/bin/serve ]] && npm -g install serve
cd /opt/wrolpi/app || exit 5