This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ea4957
commit 224eb93
Showing
2 changed files
with
33 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,13 @@ | ||
@echo off | ||
@rem Process arguments. | ||
set target_arch=x86 | ||
|
||
:next-arg | ||
if "%1"=="" goto args-done | ||
if /i "%1"=="x86" set target_arch=x86&goto arg-ok | ||
if /i "%1"=="x64" set target_arch=x64&goto arg-ok | ||
|
||
echo Warning: ignoring invalid command line option `%1`. | ||
@rem Ensure this Node.js is first in the PATH | ||
set PATH=%~dp0;%PATH% | ||
|
||
:arg-ok | ||
shift | ||
goto next-arg | ||
:args-done | ||
@rem Figure out architecture and print it. | ||
setlocal | ||
for /F "usebackq delims=" %%v in (`node -p -e process.arch`) do set arch=%%v | ||
echo Your environment has been set up for using Node.js (%arch%) and NPM | ||
endlocal | ||
|
||
@rem Ensure this Node.js is first in the PATH | ||
echo Your environment has been set up for using Node.js (%target_arch%) and NPM | ||
set PATH=%~dp0;%PATH% | ||
@rem Go to the user's home directory | ||
cd /d %HOMEDRIVE%"%HOMEPATH%" |