From c5db49136268c329c60b28a679dbc66780c4ca47 Mon Sep 17 00:00:00 2001 From: Andriy Utkin Date: Tue, 5 Mar 2024 12:20:23 +0000 Subject: [PATCH] installer/v3.sh: make source.list URL overriding possible This is for the purposes of automated testing of non-mainline package builds. --- installer/v3.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/installer/v3.sh b/installer/v3.sh index 3b55e721..058c35b6 100644 --- a/installer/v3.sh +++ b/installer/v3.sh @@ -19,7 +19,8 @@ bionic_install() apt update apt -y install gpg python3-distutils wget wget -q https://dl.bluecherrydvr.com/key/bluecherry.asc -O- | apt-key add - - wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list + : "${SRCLIST_URL:=https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list}" + wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list "$SRCLIST_URL" apt -y update apt -y install bluecherry systemctl restart bluecherry @@ -39,7 +40,8 @@ focal_install() # pip install pyopenssl --upgrade pip3 install pyOpenSSL --upgrade wget -q https://dl.bluecherrydvr.com/key/bluecherry.asc -O- | apt-key add - - wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list + : "${SRCLIST_URL:=https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list}" + wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list "$SRCLIST_URL" apt -y update # apt -y install mariadb-server-10.3 apt -y install bluecherry @@ -51,7 +53,8 @@ groovy_install() { apt -y install gpg wget wget -q https://dl.bluecherrydvr.com/key/bluecherry.asc -O- | apt-key add - - wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list + : "${SRCLIST_URL:=https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list}" + wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list "$SRCLIST_URL" apt -y update apt -y install mariadb-server bluecherry systemctl restart bluecherry @@ -62,7 +65,8 @@ hirsute_install() { apt -y install gpg wget wget -q https://dl.bluecherrydvr.com/key/bluecherry.asc -O- | apt-key add - - wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list + : "${SRCLIST_URL:=https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list}" + wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list "$SRCLIST_URL" apt -y update apt -y install mariadb-server bluecherry systemctl restart bluecherry @@ -77,7 +81,8 @@ jammy_install() # wget -q https://dl.bluecherrydvr.com/key/bluecherry.asc -O- | apt-key add - wget -q https://dl.bluecherrydvr.com/key/bluecherry.asc -O- | sudo tee /etc/apt/trusted.gpg.d/bluecherry.asc VERSION_CODENAME=jammy # don't say "vera" for Linux Mint at this point - wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list + : "${SRCLIST_URL:=https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list}" + wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list "$SRCLIST_URL" add-apt-repository ppa:ondrej/php -y apt -y update apt -y install php7.4-fpm php7.4-sqlite3 php7.4-curl php7.4-mysql php7.4-gd php-mail php-mail-mime php-mysql php7.4-fpm php7.4-mysql @@ -110,7 +115,8 @@ buster_install() pip3 install --user --upgrade pip wget -q https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 -O- | apt-key add - wget -q https://dl.bluecherrydvr.com/key/bluecherry.asc -O- | apt-key add - - wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list + : "${SRCLIST_URL:=https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list}" + wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list "$SRCLIST_URL" apt-get -y update apt-get -y install mysql-server bluecherry } @@ -122,7 +128,8 @@ bullseye_install() apt-get -y install gnupg sudo sudo python3-distutils wget wget -q https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 -O- | apt-key add - wget -q https://dl.bluecherrydvr.com/key/bluecherry.asc -O- | apt-key add - - wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list + : "${SRCLIST_URL:=https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME"-unstable.list}" + wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list "$SRCLIST_URL" apt-get -y update apt-get -y install mariadb-server bluecherry # apt-get install mariadb-server