From c80c94f15ac303f3c65e3bc65e340dcad48c0cef Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Sun, 3 Dec 2023 14:41:38 +1100 Subject: [PATCH] fixes to install script --- scripts/install.sh | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 774d522e..bf06248b 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -10,25 +10,11 @@ install_pnpm() { # Function to install Node.js and npm install_npm() { - # Detecting OS - OS="unknown" - case "$(uname -s)" in - Darwin) OS="mac" ;; - Linux) OS="linux" ;; - esac - - # Downloading and installing Node.js - if [ "$OS" = "mac" ]; then - # Install NVM (Node Version Manager) and Node.js - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - nvm install node - elif [ "$OS" = "linux" ]; then - # Using NodeSource Node.js Binary Distributions script for Linux - curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - - sudo apt-get install -y nodejs - fi + # Install NVM (Node Version Manager) and Node.js + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + nvm install node } # Function to install packages using pnpm