Scripts: Fix mantic base image support in install-nodejs.sh
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
dcbe798772
commit
0323c8ecd6
1 changed files with 7 additions and 12 deletions
19
scripts/dist/install-nodejs.sh
vendored
19
scripts/dist/install-nodejs.sh
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue