From dcbbfc5e859ac5446742abb4bb6505bcbb1a9a0b Mon Sep 17 00:00:00 2001 From: doylet Date: Tue, 20 Feb 2024 12:14:58 +1100 Subject: [PATCH] Make node environment scripts simpler --- Linux/Scripts/node-12.22.12.sh | 13 ------------- Linux/Scripts/node-12.22.12_env.sh | 8 ++++++++ Linux/Scripts/node-16.19.0.sh | 13 ------------- Linux/Scripts/node-16.19.0_env.sh | 8 ++++++++ Linux/Scripts/node-18.15.0.sh | 13 ------------- Linux/Scripts/node-18.15.0_env.sh | 8 ++++++++ Linux/Scripts/npm-12.22.12.sh | 13 ------------- Linux/Scripts/npm-16.19.0.sh | 13 ------------- Linux/Scripts/npm-18.15.0.sh | 13 ------------- Win/Scripts/node-12.22.12_env.bat | 5 +++-- Win/Scripts/node-16.19.0_env.bat | 5 ++++- Win/Scripts/node-18.15.0_env.bat | 5 +++-- 12 files changed, 34 insertions(+), 83 deletions(-) delete mode 100755 Linux/Scripts/node-12.22.12.sh create mode 100755 Linux/Scripts/node-12.22.12_env.sh delete mode 100755 Linux/Scripts/node-16.19.0.sh create mode 100755 Linux/Scripts/node-16.19.0_env.sh delete mode 100755 Linux/Scripts/node-18.15.0.sh create mode 100755 Linux/Scripts/node-18.15.0_env.sh delete mode 100755 Linux/Scripts/npm-12.22.12.sh delete mode 100755 Linux/Scripts/npm-16.19.0.sh delete mode 100755 Linux/Scripts/npm-18.15.0.sh diff --git a/Linux/Scripts/node-12.22.12.sh b/Linux/Scripts/node-12.22.12.sh deleted file mode 100755 index 36e3615..0000000 --- a/Linux/Scripts/node-12.22.12.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -desired_dir=${script_dir}/../NodeJS/12.22.12/bin -desired_exe=${desired_dir}/node -PATH=${desired_dir}:${PATH} - -curr_script=$(realpath "${BASH_SOURCE[0]}") -echo [DEVENVER] Executing script \"${curr_script}\" with \"${desired_exe}\" - -${desired_exe} $@ - diff --git a/Linux/Scripts/node-12.22.12_env.sh b/Linux/Scripts/node-12.22.12_env.sh new file mode 100755 index 0000000..e7f30e0 --- /dev/null +++ b/Linux/Scripts/node-12.22.12_env.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +curr_script=$(realpath "${BASH_SOURCE[0]}") +path_to_add=${devenver_root}/NodeJS/12.22.12/bin +echo [DEVENVER] \"${curr_script}\" is adding to path \"${path_to_add}\" + +PATH=${path_to_add}:${PATH} $@ + diff --git a/Linux/Scripts/node-16.19.0.sh b/Linux/Scripts/node-16.19.0.sh deleted file mode 100755 index b768fcf..0000000 --- a/Linux/Scripts/node-16.19.0.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -desired_dir=${script_dir}/../NodeJS/16.19.0/bin -desired_exe=${desired_dir}/node -PATH=${desired_dir}:${PATH} - -curr_script=$(realpath "${BASH_SOURCE[0]}") -echo [DEVENVER] Executing script \"${curr_script}\" with \"${desired_exe}\" - -${desired_exe} $@ - diff --git a/Linux/Scripts/node-16.19.0_env.sh b/Linux/Scripts/node-16.19.0_env.sh new file mode 100755 index 0000000..9592628 --- /dev/null +++ b/Linux/Scripts/node-16.19.0_env.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +curr_script=$(realpath "${BASH_SOURCE[0]}") +path_to_add=${devenver_root}/NodeJS/16.19.0/bin +echo [DEVENVER] \"${curr_script}\" is adding to path \"${path_to_add}\" + +PATH=${path_to_add}:${PATH} $@ + diff --git a/Linux/Scripts/node-18.15.0.sh b/Linux/Scripts/node-18.15.0.sh deleted file mode 100755 index f8bfa0f..0000000 --- a/Linux/Scripts/node-18.15.0.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -desired_dir=${script_dir}/../NodeJS/18.15.0/bin -desired_exe=${desired_dir}/node -PATH=${desired_dir}:${PATH} - -curr_script=$(realpath "${BASH_SOURCE[0]}") -echo [DEVENVER] Executing script \"${curr_script}\" with \"${desired_exe}\" - -${desired_exe} $@ - diff --git a/Linux/Scripts/node-18.15.0_env.sh b/Linux/Scripts/node-18.15.0_env.sh new file mode 100755 index 0000000..bf47768 --- /dev/null +++ b/Linux/Scripts/node-18.15.0_env.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +curr_script=$(realpath "${BASH_SOURCE[0]}") +path_to_add=${devenver_root}/NodeJS/18.15.0/bin +echo [DEVENVER] \"${curr_script}\" is adding to path \"${path_to_add}\" + +PATH=${path_to_add}:${PATH} $@ + diff --git a/Linux/Scripts/npm-12.22.12.sh b/Linux/Scripts/npm-12.22.12.sh deleted file mode 100755 index 0a42788..0000000 --- a/Linux/Scripts/npm-12.22.12.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -desired_dir=${script_dir}/../NodeJS/12.22.12/bin -desired_exe=${desired_dir}/npm -PATH=${desired_dir}:${PATH} - -curr_script=$(realpath "${BASH_SOURCE[0]}") -echo [DEVENVER] Executing script \"${curr_script}\" with \"${desired_exe}\" - -${desired_exe} $@ - diff --git a/Linux/Scripts/npm-16.19.0.sh b/Linux/Scripts/npm-16.19.0.sh deleted file mode 100755 index f8316b2..0000000 --- a/Linux/Scripts/npm-16.19.0.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -desired_dir=${script_dir}/../NodeJS/16.19.0/bin -desired_exe=${desired_dir}/npm -PATH=${desired_dir}:${PATH} - -curr_script=$(realpath "${BASH_SOURCE[0]}") -echo [DEVENVER] Executing script \"${curr_script}\" with \"${desired_exe}\" - -${desired_exe} $@ - diff --git a/Linux/Scripts/npm-18.15.0.sh b/Linux/Scripts/npm-18.15.0.sh deleted file mode 100755 index 70c1ef6..0000000 --- a/Linux/Scripts/npm-18.15.0.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -desired_dir=${script_dir}/../NodeJS/18.15.0/bin -desired_exe=${desired_dir}/npm -PATH=${desired_dir}:${PATH} - -curr_script=$(realpath "${BASH_SOURCE[0]}") -echo [DEVENVER] Executing script \"${curr_script}\" with \"${desired_exe}\" - -${desired_exe} $@ - diff --git a/Win/Scripts/node-12.22.12_env.bat b/Win/Scripts/node-12.22.12_env.bat index 24a7db5..9d5454a 100644 --- a/Win/Scripts/node-12.22.12_env.bat +++ b/Win/Scripts/node-12.22.12_env.bat @@ -1,6 +1,7 @@ @echo off setlocal - set path=%devenver_root%\NodeJS\12.22.12;%path% - echo [DEVENVER] Executing script "%~dpnx0" with "%*" + set path_to_add=%devenver_root%\NodeJS\12.22.12 + set path=%path_to_add%;%path% + echo [DEVENVER] "%~dpnx0" is adding to path "%path_to_add%" call %* endlocal diff --git a/Win/Scripts/node-16.19.0_env.bat b/Win/Scripts/node-16.19.0_env.bat index 69cd72b..fbb6d7d 100644 --- a/Win/Scripts/node-16.19.0_env.bat +++ b/Win/Scripts/node-16.19.0_env.bat @@ -1,4 +1,7 @@ @echo off setlocal - call %devenver_root%\raddbg\trunk\raddbg.exe --user %devenver_root%\raddbg\doylet.raddbg_user + set path_to_add=%devenver_root%\NodeJS\16.19.0 + set path=%path_to_add%;%path% + echo [DEVENVER] "%~dpnx0" is adding to path "%path_to_add%" + call %* endlocal diff --git a/Win/Scripts/node-18.15.0_env.bat b/Win/Scripts/node-18.15.0_env.bat index 185eef2..dc7417a 100644 --- a/Win/Scripts/node-18.15.0_env.bat +++ b/Win/Scripts/node-18.15.0_env.bat @@ -1,6 +1,7 @@ @echo off setlocal - set path=%devenver_root%\NodeJS\18.15.0;%path% - echo [DEVENVER] Executing script "%~dpnx0" with "%exe_to_use%" + set path_to_add=%devenver_root%\NodeJS\18.15.0 + set path=%path_to_add%;%path% + echo [DEVENVER] "%~dpnx0" is adding to path "%path_to_add%" call %* endlocal