script/INSTALL_PWSH.bat
raw| 1 | @echo off |
| 2 | |
| 3 | :: installation path can be passed as argument |
| 4 | if [%1]==[] ( |
| 5 | set "installpath=%ProgramFiles%\Environment Modules" |
| 6 | ) else ( |
| 7 | set "installpath=%1" |
| 8 | ) |
| 9 | |
| 10 | :: create installation directory |
| 11 | md "%installpath%" |
| 12 | :: quit if directory not created |
| 13 | if not exist "%installpath%" ( exit /b 1 ) |
| 14 | |
| 15 | :: install files |
| 16 | xcopy /Y /S /F "%~dp0\*" "%installpath%\" |
| 17 | :: quit on error |
| 18 | if errorlevel 1 ( exit /b 2 ) |
| 19 | |
| 20 | :: vim:set tabstop=3 shiftwidth=3 expandtab autoindent: |