fix batch script asking for module tag if none is given
This commit is contained in:
+19
-11
@@ -1,18 +1,26 @@
|
||||
@echo off
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
echo %cmdcmdline% | findstr /i /c:"%~nx0" >NUL && set iscommandline=1
|
||||
echo %PSModulePath% | findstr "%USERPROFILE%" >NUL && set ispowershell=1
|
||||
echo %PSModulePath% | findstr /i /c:"%USERPROFILE%" >NUL && set ispowershell=1
|
||||
cd /D "%~dp0"
|
||||
|
||||
echo.
|
||||
SET UserModuleTag=
|
||||
IF "%~1"=="" (
|
||||
echo Module tag not specified.
|
||||
set /p UserModuleTag=Insert module tag:
|
||||
IF "!UserModuleTag!"=="" (
|
||||
echo Module tag is required to extract internals!
|
||||
exit /b 1
|
||||
) ELSE (
|
||||
echo Using module tag: !UserModuleTag!
|
||||
set ModuleTag=!UserModuleTag!
|
||||
)
|
||||
) ELSE (
|
||||
echo Using module tag: %~1
|
||||
set ModuleTag=%~1
|
||||
)
|
||||
|
||||
@REM IF %* == "" echo "Module tag not specified."
|
||||
@REM #set /p "ModuleTag=Insert module tag: "
|
||||
@REM ) ELSE (
|
||||
@REM #set "ModuleTag=%*"
|
||||
@REM )
|
||||
|
||||
@powershell -NoProfile -ExecutionPolicy Bypass -Command .\scripts\extract-elx-internals.ps1 -ModuleTag %*
|
||||
|
||||
echo.
|
||||
@powershell -NoProfile -ExecutionPolicy Bypass -Command .\scripts\extract-elx-internals.ps1 -ModuleTag %ModuleTag%
|
||||
|
||||
IF DEFINED iscommandline IF NOT DEFINED ispowershell pause
|
||||
ENDLOCAL
|
||||
|
||||
Reference in New Issue
Block a user