Skip to content

Commit

Permalink
Update install-deps.sh per Nodesource instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-berry committed Sep 4, 2023
1 parent f6f32d6 commit 9f3703a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -ex

NODE_VERSION=20

deps_apt() {
# Check for old Ubuntus
if [ "$(lsb_release -i |awk '{print $3}')" = "Ubuntu" ]; then
Expand Down Expand Up @@ -32,10 +34,15 @@ deps_apt() {
fi

# Build tools
sudo apt-get install -y make git diffutils patch rsync zip
sudo apt-get install -y make git diffutils patch rsync zip ca-certificates curl gnupg

if ! type node; then
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list

sudo apt-get update
sudo apt-get install -y nodejs
fi
}
Expand Down

0 comments on commit 9f3703a

Please sign in to comment.