2023-09-22 06:26:08 +00:00
|
|
|
@echo off
|
|
|
|
setlocal
|
|
|
|
|
2023-09-27 20:15:01 +00:00
|
|
|
@REM SET BASE_IMG=git.1159.cl/mario1159/analog-xk-web:latest
|
2023-09-29 19:04:17 +00:00
|
|
|
SET BASE_IMG=git.1159.cl/mario1159/heavy-desktop:latest
|
|
|
|
SET RESULT_IMAGE=akilesalreadytaken/chipathon-tools:latest
|
2023-09-22 06:26:08 +00:00
|
|
|
|
|
|
|
SET CALL=call
|
|
|
|
:parse
|
|
|
|
IF /I ""%1""=="""" GOTO run
|
|
|
|
IF /I ""%1""==""--help"" GOTO documentation
|
|
|
|
IF /I ""%1""==""-h"" GOTO documentation
|
|
|
|
IF /I ""%1""==""--dry"" ( SET "CALL=echo" )
|
|
|
|
IF /I ""%1""==""-s"" ( SET "CALL=echo" )
|
|
|
|
IF /I ""%1""==""--path"" ( SET "DESIGNS=%~2" && SHIFT )
|
|
|
|
IF /I ""%1""==""-p"" ( SET "DESIGNS=%~2" && SHIFT )
|
|
|
|
SHIFT
|
|
|
|
GOTO parse
|
|
|
|
|
|
|
|
|
|
|
|
:documentation
|
|
|
|
echo Usage: run.bat %~nx0 [-h^|--help] [-s^|--dry-run]
|
|
|
|
GOTO end
|
|
|
|
|
|
|
|
|
|
|
|
:run
|
2023-09-29 19:04:17 +00:00
|
|
|
%CALL% docker build --build-arg BASE_IMG=%BASE_IMG% -t %RESULT_IMAGE% -f stacks/chipathon-tools/Dockerfile stacks/chipathon-tools/
|
2023-09-22 06:26:08 +00:00
|
|
|
GOTO end
|
|
|
|
|
|
|
|
:end
|
|
|
|
endlocal
|
|
|
|
|
|
|
|
|
|
|
|
:normalizepath
|
|
|
|
SET DESIGNS=%~f1
|
|
|
|
EXIT /B
|
|
|
|
|
|
|
|
|
|
|
|
:: Get DISPLAY from WSL
|
|
|
|
::wsl --exec bash --norc -c 'echo $DISPLAY'
|
|
|
|
|
|
|
|
:: Get current path of batsh script
|
2023-09-27 20:15:01 +00:00
|
|
|
::SET BATCH_PATH=%~dpnx0
|