From a9560992c5fb78545bbb2a47de05371db0ddf1b7 Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 28 Dec 2022 19:54:40 -0700 Subject: [PATCH] Install single-file, pip, readability as background tasks. --- scripts/install_ubuntu_20.04.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/install_ubuntu_20.04.sh b/scripts/install_ubuntu_20.04.sh index d1beb2a9..85cc20e7 100755 --- a/scripts/install_ubuntu_20.04.sh +++ b/scripts/install_ubuntu_20.04.sh @@ -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