From ef6c9fbd6d4ab99344e0aa1a30472a81950874ee Mon Sep 17 00:00:00 2001 From: Dave Page Date: Fri, 13 Mar 2020 11:55:03 +0000 Subject: [PATCH] Setup dependencies as required on Ubuntu 16.04 and Debian 9 --- pkg/debian/setup.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/pkg/debian/setup.sh b/pkg/debian/setup.sh index 7a695b7a9..200e88c87 100755 --- a/pkg/debian/setup.sh +++ b/pkg/debian/setup.sh @@ -1,15 +1,29 @@ #!/bin/bash -sudo apt install curl +if [ "$EUID" -ne 0 ] + then echo "This script must be run as root" + exit 1 +fi + +echo "Installing system pre-requisites..." +apt install -y curl apt-transport-https ca-certificates + +echo "Removing yarn (which may not be the package we expect)..." +dpkg -r yarn + +# Node repo +echo "Setting up the NodeJS repo..." +curl -sL https://deb.nodesource.com/setup_10.x | bash - # Yarn repo -curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list +echo "Setting up the Yarn repo..." +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list -sudo apt update +echo "Running apt update..." +apt update # Install pre-reqs -echo Installing pre-requisites... -sudo apt install -y build-essential python3-dev python3-venv python3-sphinx libpq-dev qt5-default yarn - +echo "Installing build pre-requisites..." +apt install -y build-essential python3-dev python3-venv python3-sphinx libpq-dev libffi-dev qt5-default nodejs yarn