Changed trials-in-common page to use a single database query to get analyses. Changed...
[sgn.git] / js / install_node.sh
blob3d0e963c5623a8252ca16771a487d84ffaabcacc
1 #!/usr/bin/env bash
3 if [[ $(/usr/bin/id -u) -ne 0 ]]; then
4 echo "\nMust run script as root."
5 exit
6 fi
8 # Add the NodeSource package signing key
9 curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
11 # Add the desired NodeSource repository
12 VERSION=node_20.x
13 # The below command will set this correctly, but if lsb_release isn't available, you can set it manually:
14 # - For Debian distributions: jessie, sid, etc...
15 # - For Ubuntu distributions: xenial, bionic, etc...
16 DISTRO="$(lsb_release -s -c)"
17 echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list
18 echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | tee -a /etc/apt/sources.list.d/nodesource.list
20 # Update package lists and install Node.js
21 apt-get update
22 apt-get install nodejs -y