DEVenv/Win/Scripts/node_env.bat

24 lines
566 B
Batchfile
Raw Normal View History

2024-04-11 04:36:44 +00:00
@echo off
setlocal EnableDelayedExpansion
set root_path=%devenver_root%\NodeJS
2024-04-18 11:08:44 +00:00
set version=%~1
for /f "tokens=1,* delims= " %%a in ("%*") do set remaining_args=%%b
2024-04-11 04:36:44 +00:00
2024-04-18 11:08:44 +00:00
if "%~1"=="help" goto :help
if "%~1"=="" goto :help
if "%~1"=="--help" goto :help
if "%~1"=="/?" goto :help
2024-04-11 04:36:44 +00:00
goto :run
:help
2024-04-18 11:08:44 +00:00
echo USAGE: node_env.bat ^<version^> [^<command^>]
2024-04-11 04:36:44 +00:00
echo.
echo VERSIONS:
ls %root_path%
goto :eof
:run
2024-04-18 11:08:44 +00:00
echo [SCRIPT] Adding to path '%root_path%\%version%' and executing '%remaining_args%'
set PATH=%root_path%\%version%;%PATH%
%remaining_args%