From c34b47a0d0f398c0011e5ad9e8ef76e08777bdee Mon Sep 17 00:00:00 2001 From: Boaz Sender Date: Sun, 20 Apr 2025 12:15:44 -0700 Subject: [PATCH] separate volta from main install script --- setup/listener-puppet/install.sh | 8 -------- setup/listener-puppet/readme.md | 3 ++- setup/listener-puppet/volta.sh | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 setup/listener-puppet/volta.sh diff --git a/setup/listener-puppet/install.sh b/setup/listener-puppet/install.sh index bb9eee7..0579821 100644 --- a/setup/listener-puppet/install.sh +++ b/setup/listener-puppet/install.sh @@ -13,13 +13,6 @@ update_system() { sudo apt -y install git vim zsh mplayer } -install_volta() { - echo "Installing node@latest via volta" - sh -c "wget -qO- https://get.volta.sh | bash" - exec $SHELL - volta install node@latest -} - install_screen() { echo "Installing screen program" cd portal @@ -63,7 +56,6 @@ install_ohmyzsh() { install_all() { update_system - install_volta install_screen install_sound_card_drivers configure_sound diff --git a/setup/listener-puppet/readme.md b/setup/listener-puppet/readme.md index 9d49582..6c0309d 100644 --- a/setup/listener-puppet/readme.md +++ b/setup/listener-puppet/readme.md @@ -57,7 +57,8 @@ wget https://git.featherboaz.com/boazsender/portal/archive/main.zip unzip main.zip rm main.zip cd portal/setup/listener-puppet -chmod +x install.sh && ./install.sh +chmod +x volta.sh && chmod +x install.sh && ./volta +./install.sh ``` ### Using node and npm diff --git a/setup/listener-puppet/volta.sh b/setup/listener-puppet/volta.sh new file mode 100644 index 0000000..6415706 --- /dev/null +++ b/setup/listener-puppet/volta.sh @@ -0,0 +1,17 @@ +is_Raspberry=$(cat /proc/device-tree/model | awk '{print $1}') +if [ "x${is_Raspberry}" != "xRaspberry" ] ; then + echo "This script contains drivers for the Raspberry pi and will not work on the current platform." + exit 1 +fi + +echo "Installing node@latest via volta" +sh -c "wget -qO- https://get.volta.sh | bash" +exec $SHELL +volta install node@latest + + + +echo "------------------------------------------------------" +echo "Volta is installed." +echo "Continue with ./install.sh" +echo "------------------------------------------------------" \ No newline at end of file