From 0323c8ecd66a5be0f200afb3ae717a2d638985f3 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 26 Oct 2023 11:42:47 +0200 Subject: [PATCH] Scripts: Fix mantic base image support in install-nodejs.sh Signed-off-by: Michael Mayer --- scripts/dist/install-nodejs.sh | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/scripts/dist/install-nodejs.sh b/scripts/dist/install-nodejs.sh index 992d38aa3..ceccf0700 100755 --- a/scripts/dist/install-nodejs.sh +++ b/scripts/dist/install-nodejs.sh @@ -18,20 +18,15 @@ set -e # NodeJS version. NODE_MAJOR=20 -if [[ $VERSION_CODENAME == "mantic" ]]; then - echo "Installing NodeJS and NPM distribution packages..." - apt-get update && apt-get -qq install nodejs npm -else - # Create /etc/apt/keyrings/nodesource.gpg - mkdir -p /etc/apt/keyrings - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +# Create /etc/apt/keyrings/nodesource.gpg +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg - # Create /etc/apt/sources.list.d/nodesource.list - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list +# Create /etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list - echo "Installing NodeJS and NPM from deb.nodesource.com..." - apt-get update && apt-get -qq install nodejs -fi +echo "Installing NodeJS and NPM from deb.nodesource.com..." +apt-get update && apt-get -qq install nodejs echo "Installing TestCafe..." npm config set cache ~/.cache/npm