extractcode.bat · 843 B · ext
.bat · seen 3325× in SWHvia fallback
swh:1:cnt:4b7424fc013d5af1a8f695e7e2c50142643f337f;origin=https://github.com/darcyfdu/findlicense;anchor=swh:1:rev:888cfb21a7378408032f60d06ee5598d3228dbc5;path=/extractcode.bat
Show source
@echo OFF
@rem Copyright (c) 2015 nexB Inc. http://www.nexb.com/ - All rights reserved.
@rem
@rem A minimal shell wrapper to the CLI entry point
set SCANCODE_ROOT_DIR=%~dp0
set SCANCODE_CMD_LINE_ARGS=
set SCANCODE_CONFIGURED_PYTHON=%SCANCODE_ROOT_DIR%\bin\python.exe
@rem Collect all command line arguments in a variable
:collectarg
if ""%1""=="""" goto continue
call set SCANCODE_CMD_LINE_ARGS=%SCANCODE_CMD_LINE_ARGS% %1
shift
goto collectarg
:continue
if not exist "%SCANCODE_CONFIGURED_PYTHON%" goto configure
goto scancode
:configure
echo * Configuring ScanCode for first use...
set CONFIGURE_QUIET=1
call "%SCANCODE_ROOT_DIR%\configure" etc/conf
if %errorlevel% neq 0 (
exit /b %errorlevel%
)
:scancode
"%SCANCODE_ROOT_DIR%\bin\extractcode" %SCANCODE_CMD_LINE_ARGS%
:EOS