diff --git a/install.sh b/install.sh index 4654883f..729f9ec8 100755 --- a/install.sh +++ b/install.sh @@ -1,10 +1,10 @@ #! /usr/bin/env bash -# This script will install WROLPi to `/opt/wrolpi` on a fresh/empty Raspberry Pi. It is expected to be run once to +# This script will install WROLPi to `/opt/wrolpi` on a fresh/empty machine. It is expected to be run once to # install, and any subsequent runs will update WROLPi. This script assumes it will be run as the `root` user. Help() { # Display Help - echo "Install WROLPi onto this Raspberry Pi." + echo "Install WROLPi onto this machine." echo echo "Syntax: install.sh [-h] [-b BRANCH]" echo "options:" diff --git a/scripts/install_debian_11.sh b/scripts/install_debian_11.sh index 8fd09092..c156ff57 100755 --- a/scripts/install_debian_11.sh +++ b/scripts/install_debian_11.sh @@ -10,27 +10,25 @@ apt install -y apt-transport-https ca-certificates curl gnupg-agent gcc libpq-de postgresql-13 nginx-full nginx-doc python3-full python3-dev python3-doc python3-venv htop vim ffmpeg hostapd \ chromium chromium-driver cpufrequtils network-manager npm -# 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. -fi -readability-extractor --version || npm install -g 'git+https://github.com/pirate/readability-extractor' +# Install serve, and archiving tools. +sudo npm i -g serve single-file-cli@1.0.15 '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 npm and 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 npm install || npm install || npm install || npm install # try install multiple times :( npm run build & -# Install python requirements files in background job. +# Install python requirements in background job. pip3 install -r /opt/wrolpi/requirements.txt & wait $(jobs -p) diff --git a/scripts/install_ubuntu_20.04.sh b/scripts/install_ubuntu_20.04.sh index 85cc20e7..79e01f79 100755 --- a/scripts/install_ubuntu_20.04.sh +++ b/scripts/install_ubuntu_20.04.sh @@ -13,12 +13,8 @@ apt install -y apt-transport-https ca-certificates curl gnupg-agent gcc libpq-de postgresql-12 nginx-full nginx-doc python3.8-minimal python3.8-dev python3.8-doc python3.8-venv \ ffmpeg hostapd nodejs chromium-browser chromium-chromedriver cpufrequtils network-manager -# Install Archiving tools. -SF_VERSION="1.0.15" -if [ "$(single-file --version)" != "${SF_VERSION}" ]; then - 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' & +# Install serve, and archiving tools. +sudo npm i -g serve single-file-cli@1.0.15 'git+https://github.com/pirate/readability-extractor' & # Setup the virtual environment that main.py expects pip3 --version || ( @@ -27,16 +23,15 @@ pip3 --version || ( python3 /tmp/get-pip.py & ) -# Wait for single-file, readability, pip3. +# Wait for npm and 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 npm install || npm install || npm install || npm install # try install multiple times :( npm run build & -# Install python requirements files in background job. +# Install python requirements in background job. pip3 install -r /opt/wrolpi/requirements.txt & wait $(jobs -p)