forked from aboutcode-org/deltacode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeltacode.bat
34 lines (26 loc) · 881 Bytes
/
deltacode.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@echo OFF
@rem Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved.
@rem A minimal shell wrapper to the CLI entry point
set DELTACODE_ROOT_DIR=%~dp0
@rem Use a trailing space in the next line to set the variable to an empty string
set DELTACODE_CMD_LINE_ARGS=
set DELTACODE_CONFIGURED_PYTHON=%DELTACODE_ROOT_DIR%\tmp\bin\python.exe
@rem Collect all command line arguments in a variable
:collectarg
if ""%1""=="""" goto continue
call set DELTACODE_CMD_LINE_ARGS=%DELTACODE_CMD_LINE_ARGS% %1
shift
goto collectarg
:continue
if not exist "%DELTACODE_CONFIGURED_PYTHON%" goto configure
goto deltacode
:configure
echo * Configuring DeltaCode for first use...
set CONFIGURE_QUIET=1
call "%DELTACODE_ROOT_DIR%\configure" etc/conf
if %errorlevel% neq 0 (
exit /b %errorlevel%
)
:deltacode
"%DELTACODE_ROOT_DIR%\tmp\bin\deltacode" %DELTACODE_CMD_LINE_ARGS%
:EOS