cli: Add spark.console.cmd (alias for Spark.Console.exe)
This commit is contained in:
1 parent
cddf081e19
commit
c94ffd1a56
1 file changed
+33
@@ -0,0 +1,33 @@
|
||||
@echo off
|
||||
|
||||
@REM Launch Spark.Console.exe
|
||||
@REM Usage: spark.console.cmd <spark_console_exe_args>
|
||||
@REM Usage: spark.console.cmd [debug|release] <spark_console_exe_args>
|
||||
|
||||
setlocal
|
||||
@REM Note: Evaluate %~dp0 before running SHIFT. Initially, it equals this
|
||||
@REM script's parent dir. Once SHIFT is run, it changes to the working dir.
|
||||
set REPO_DIR=%~dp0..
|
||||
set BUILD_TYPE=Debug
|
||||
|
||||
@REM If the first arg is 'debug' or 'release', it indicates which
|
||||
@REM Spark.Console.exe to run (debug or release). All other args are passed to
|
||||
@REM Spark.Console.exe.
|
||||
IF /I "%1"=="release" (
|
||||
set BUILD_TYPE=Release
|
||||
shift
|
||||
) ELSE IF /I "%1"=="debug" (
|
||||
shift
|
||||
)
|
||||
|
||||
set SPARK_CONSOLE_EXE_ARGS=%1
|
||||
if "%1"=="" goto launch_spark_console
|
||||
shift
|
||||
:exe_args_loop
|
||||
if "%1"=="" goto launch_spark_console
|
||||
set SPARK_CONSOLE_EXE_ARGS=%SPARK_CONSOLE_EXE_ARGS% %1
|
||||
shift
|
||||
goto exe_args_loop
|
||||
|
||||
:launch_spark_console
|
||||
%REPO_DIR%\build\%BUILD_TYPE%\bin\net7.0\Spark.Console.exe %SPARK_CONSOLE_EXE_ARGS%
|
||||
Reference in new issue
Block a user